[libcxx] r284325 - Fix use of non-constexpr C++14 addressof

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 15 20:49:18 PDT 2016


Author: ericwf
Date: Sat Oct 15 22:49:18 2016
New Revision: 284325

URL: http://llvm.org/viewvc/llvm-project?rev=284325&view=rev
Log:
Fix use of non-constexpr C++14 addressof

Modified:
    libcxx/trunk/include/experimental/optional

Modified: libcxx/trunk/include/experimental/optional
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/optional?rev=284325&r1=284324&r2=284325&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/optional (original)
+++ libcxx/trunk/include/experimental/optional Sat Oct 15 22:49:18 2016
@@ -488,7 +488,7 @@ public:
     {
         _LIBCPP_ASSERT(this->__engaged_, "optional operator-> called for disengaged value");
 #ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
-        return _VSTD::addressof(this->__val_);
+        return __builtin_addressof(this->__val_);
 #else
         return __operator_arrow(__has_operator_addressof<value_type>{});
 #endif




More information about the cfe-commits mailing list