From 6c26be6c876670b71eba01225f6dd03ce3aca7e3 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 16 Apr 2017 02:50:40 +0000 Subject: [PATCH] Replace _LIBCPP_HAS_NO_ with _LIBCPP_CXX03_LANG in git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300412 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/array | 4 ++-- test/std/containers/sequences/array/array.size/size.pass.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/array b/include/array index 165ffad6b..31f5501b9 100644 --- a/include/array +++ b/include/array @@ -316,7 +316,7 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT return __a.__elems_[_Ip]; } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 @@ -336,7 +336,7 @@ get(const array<_Tp, _Size>&& __a) _NOEXCEPT return _VSTD::move(__a.__elems_[_Ip]); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // !_LIBCPP_CXX03_LANG _LIBCPP_END_NAMESPACE_STD diff --git a/test/std/containers/sequences/array/array.size/size.pass.cpp b/test/std/containers/sequences/array/array.size/size.pass.cpp index a833fdc04..2fe535512 100644 --- a/test/std/containers/sequences/array/array.size/size.pass.cpp +++ b/test/std/containers/sequences/array/array.size/size.pass.cpp @@ -14,6 +14,8 @@ #include #include +#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 C;