[libcxx] r300412 - Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <array>

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 15 19:50:41 PDT 2017


Author: ericwf
Date: Sat Apr 15 21:50:40 2017
New Revision: 300412

URL: http://llvm.org/viewvc/llvm-project?rev=300412&view=rev
Log:
Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <array>

Modified:
    libcxx/trunk/include/array
    libcxx/trunk/test/std/containers/sequences/array/array.size/size.pass.cpp

Modified: libcxx/trunk/include/array
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/array?rev=300412&r1=300411&r2=300412&view=diff
==============================================================================
--- libcxx/trunk/include/array (original)
+++ libcxx/trunk/include/array Sat Apr 15 21:50:40 2017
@@ -316,7 +316,7 @@ get(const array<_Tp, _Size>& __a) _NOEXC
     return __a.__elems_[_Ip];
 }
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
 
 template <size_t _Ip, class _Tp, size_t _Size>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
@@ -336,7 +336,7 @@ get(const array<_Tp, _Size>&& __a) _NOEX
     return _VSTD::move(__a.__elems_[_Ip]);
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif  // !_LIBCPP_CXX03_LANG
 
 _LIBCPP_END_NAMESPACE_STD
 

Modified: libcxx/trunk/test/std/containers/sequences/array/array.size/size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/array/array.size/size.pass.cpp?rev=300412&r1=300411&r2=300412&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/array/array.size/size.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/array/array.size/size.pass.cpp Sat Apr 15 21:50:40 2017
@@ -14,6 +14,8 @@
 #include <array>
 #include <cassert>
 
+#include "test_macros.h"
+
 // std::array is explicitly allowed to be initialized with A a = { init-list };.
 // Disable the missing braces warning for this reason.
 #include "disable_missing_braces_warning.h"
@@ -36,7 +38,7 @@ int main()
         assert(c.max_size() == 0);
         assert(c.empty());
     }
-#ifndef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER >= 11
     {
         typedef double T;
         typedef std::array<T, 3> C;




More information about the cfe-commits mailing list