Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <array>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300412 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -316,7 +316,7 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT
|
|||||||
return __a.__elems_[_Ip];
|
return __a.__elems_[_Ip];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <size_t _Ip, class _Tp, size_t _Size>
|
template <size_t _Ip, class _Tp, size_t _Size>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
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]);
|
return _VSTD::move(__a.__elems_[_Ip]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // !_LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
_LIBCPP_END_NAMESPACE_STD
|
_LIBCPP_END_NAMESPACE_STD
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
// std::array is explicitly allowed to be initialized with A a = { init-list };.
|
// std::array is explicitly allowed to be initialized with A a = { init-list };.
|
||||||
// Disable the missing braces warning for this reason.
|
// Disable the missing braces warning for this reason.
|
||||||
#include "disable_missing_braces_warning.h"
|
#include "disable_missing_braces_warning.h"
|
||||||
@@ -36,7 +38,7 @@ int main()
|
|||||||
assert(c.max_size() == 0);
|
assert(c.max_size() == 0);
|
||||||
assert(c.empty());
|
assert(c.empty());
|
||||||
}
|
}
|
||||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
#if TEST_STD_VER >= 11
|
||||||
{
|
{
|
||||||
typedef double T;
|
typedef double T;
|
||||||
typedef std::array<T, 3> C;
|
typedef std::array<T, 3> C;
|
||||||
|
|||||||
Reference in New Issue
Block a user