diff options
32 files changed, 126 insertions, 102 deletions
diff --git a/libcxx/include/random b/libcxx/include/random index 835ebdb6c13..83fff90a417 100644 --- a/libcxx/include/random +++ b/libcxx/include/random @@ -2826,7 +2826,7 @@ public: static _LIBCPP_CONSTEXPR const size_t block_size = __p; static _LIBCPP_CONSTEXPR const size_t used_block = __r; -#ifdef _LIBCPP_HAS_NO_CONSTEXPR +#ifdef _LIBCPP_CXX03_LANG static const result_type _Min = _Engine::_Min; static const result_type _Max = _Engine::_Max; #else @@ -2845,11 +2845,11 @@ public: _LIBCPP_INLINE_VISIBILITY explicit discard_block_engine(const _Engine& __e) : __e_(__e), __n_(0) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit discard_block_engine(_Engine&& __e) : __e_(_VSTD::move(__e)), __n_(0) {} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {} template<class _Sseq> @@ -3014,7 +3014,7 @@ private: result_type, _Engine_result_type >::type _Working_result_type; -#ifdef _LIBCPP_HAS_NO_CONSTEXPR +#ifdef _LIBCPP_CXX03_LANG static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min + _Working_result_type(1); #else @@ -3055,11 +3055,11 @@ public: _LIBCPP_INLINE_VISIBILITY explicit independent_bits_engine(const _Engine& __e) : __e_(__e) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit independent_bits_engine(_Engine&& __e) : __e_(_VSTD::move(__e)) {} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit independent_bits_engine(result_type __sd) : __e_(__sd) {} template<class _Sseq> @@ -3264,7 +3264,7 @@ public: // engine characteristics static _LIBCPP_CONSTEXPR const size_t table_size = __k; -#ifdef _LIBCPP_HAS_NO_CONSTEXPR +#ifdef _LIBCPP_CXX03_LANG static const result_type _Min = _Engine::_Min; static const result_type _Max = _Engine::_Max; #else @@ -3285,11 +3285,11 @@ public: _LIBCPP_INLINE_VISIBILITY explicit shuffle_order_engine(const _Engine& __e) : __e_(__e) {__init();} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit shuffle_order_engine(_Engine&& __e) : __e_(_VSTD::move(__e)) {__init();} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();} template<class _Sseq> @@ -3526,11 +3526,11 @@ public: // constructors _LIBCPP_INLINE_VISIBILITY seed_seq() _NOEXCEPT {} -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template<class _Tp> _LIBCPP_INLINE_VISIBILITY seed_seq(initializer_list<_Tp> __il) {init(__il.begin(), __il.end());} -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _InputIterator> _LIBCPP_INLINE_VISIBILITY @@ -3637,7 +3637,7 @@ generate_canonical(_URNG& __g) { const size_t _Dt = numeric_limits<_RealType>::digits; const size_t __b = _Dt < __bits ? _Dt : __bits; -#ifdef _LIBCPP_HAS_NO_CONSTEXPR +#ifdef _LIBCPP_CXX03_LANG const size_t __logR = __log2<uint64_t, _URNG::_Max - _URNG::_Min + uint64_t(1)>::value; #else const size_t __logR = __log2<uint64_t, _URNG::max() - _URNG::min() + uint64_t(1)>::value; @@ -5851,11 +5851,11 @@ public: _LIBCPP_INLINE_VISIBILITY param_type(_InputIterator __f, _InputIterator __l) : __p_(__f, __l) {__init();} -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY param_type(initializer_list<double> __wl) : __p_(__wl.begin(), __wl.end()) {__init();} -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _UnaryOperation> param_type(size_t __nw, double __xmin, double __xmax, _UnaryOperation __fw); @@ -5898,11 +5898,11 @@ public: _LIBCPP_INLINE_VISIBILITY discrete_distribution(_InputIterator __f, _InputIterator __l) : __p_(__f, __l) {} -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY discrete_distribution(initializer_list<double> __wl) : __p_(__wl) {} -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY discrete_distribution(size_t __nw, double __xmin, double __xmax, @@ -6079,10 +6079,10 @@ public: template<class _InputIteratorB, class _InputIteratorW> param_type(_InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW); -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template<class _UnaryOperation> param_type(initializer_list<result_type> __bl, _UnaryOperation __fw); -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _UnaryOperation> param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); @@ -6132,13 +6132,13 @@ public: _InputIteratorW __fW) : __p_(__fB, __lB, __fW) {} -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY piecewise_constant_distribution(initializer_list<result_type> __bl, _UnaryOperation __fw) : __p_(__bl, __fw) {} -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY @@ -6268,7 +6268,7 @@ piecewise_constant_distribution<_RealType>::param_type::param_type( } } -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template<class _RealType> template<class _UnaryOperation> @@ -6293,7 +6293,7 @@ piecewise_constant_distribution<_RealType>::param_type::param_type( } } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _RealType> template<class _UnaryOperation> @@ -6402,10 +6402,10 @@ public: template<class _InputIteratorB, class _InputIteratorW> param_type(_InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW); -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template<class _UnaryOperation> param_type(initializer_list<result_type> __bl, _UnaryOperation __fw); -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _UnaryOperation> param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); @@ -6455,13 +6455,13 @@ public: _InputIteratorW __fW) : __p_(__fB, __lB, __fW) {} -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY piecewise_linear_distribution(initializer_list<result_type> __bl, _UnaryOperation __fw) : __p_(__bl, __fw) {} -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY @@ -6595,7 +6595,7 @@ piecewise_linear_distribution<_RealType>::param_type::param_type( } } -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template<class _RealType> template<class _UnaryOperation> @@ -6620,7 +6620,7 @@ piecewise_linear_distribution<_RealType>::param_type::param_type( } } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template<class _RealType> template<class _UnaryOperation> diff --git a/libcxx/include/valarray b/libcxx/include/valarray index f0f1f62a1db..f8e19acdb71 100644 --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -807,13 +807,11 @@ public: valarray(const value_type& __x, size_t __n); valarray(const value_type* __p, size_t __n); valarray(const valarray& __v); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY valarray(valarray&& __v) _NOEXCEPT; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS valarray(initializer_list<value_type> __il); -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG valarray(const slice_array<value_type>& __sa); valarray(const gslice_array<value_type>& __ga); valarray(const mask_array<value_type>& __ma); @@ -823,14 +821,12 @@ public: // assignment: valarray& operator=(const valarray& __v); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY valarray& operator=(valarray&& __v) _NOEXCEPT; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY valarray& operator=(initializer_list<value_type>); -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY valarray& operator=(const value_type& __x); _LIBCPP_INLINE_VISIBILITY @@ -861,32 +857,32 @@ public: __val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const; _LIBCPP_INLINE_VISIBILITY gslice_array<value_type> operator[](const gslice& __gs); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const; _LIBCPP_INLINE_VISIBILITY gslice_array<value_type> operator[](gslice&& __gs); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __val_expr<__mask_expr<const valarray&> > operator[](const valarray<bool>& __vb) const; _LIBCPP_INLINE_VISIBILITY mask_array<value_type> operator[](const valarray<bool>& __vb); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __val_expr<__mask_expr<const valarray&> > operator[](valarray<bool>&& __vb) const; _LIBCPP_INLINE_VISIBILITY mask_array<value_type> operator[](valarray<bool>&& __vb); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const; _LIBCPP_INLINE_VISIBILITY indirect_array<value_type> operator[](const valarray<size_t>& __vs); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const; _LIBCPP_INLINE_VISIBILITY indirect_array<value_type> operator[](valarray<size_t>&& __vs); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG // unary operators: valarray operator+() const; @@ -1480,7 +1476,7 @@ public: __stride_(__stride) {__init(__start);} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY gslice(size_t __start, const valarray<size_t>& __size, @@ -1503,7 +1499,7 @@ public: __stride_(move(__stride)) {__init(__start);} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG // gslice(const gslice&) = default; // gslice(gslice&&) = default; @@ -1656,12 +1652,12 @@ private: __1d_(__gs.__1d_) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG gslice_array(gslice&& __gs, const valarray<value_type>& __v) : __vp_(const_cast<value_type*>(__v.__begin_)), __1d_(move(__gs.__1d_)) {} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class> friend class valarray; }; @@ -2353,7 +2349,7 @@ private: __1d_(__ia) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v) @@ -2361,7 +2357,7 @@ private: __1d_(move(__ia)) {} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class> friend class valarray; }; @@ -2572,7 +2568,7 @@ private: __1d_(__ia) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e) @@ -2580,7 +2576,7 @@ private: __1d_(move(__ia)) {} -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG public: _LIBCPP_INLINE_VISIBILITY @@ -2814,7 +2810,7 @@ valarray<_Tp>::valarray(const valarray& __v) } } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -2825,10 +2821,6 @@ valarray<_Tp>::valarray(valarray&& __v) _NOEXCEPT __v.__begin_ = __v.__end_ = nullptr; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS - template <class _Tp> valarray<_Tp>::valarray(initializer_list<value_type> __il) : __begin_(0), @@ -2855,7 +2847,7 @@ valarray<_Tp>::valarray(initializer_list<value_type> __il) } } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template <class _Tp> valarray<_Tp>::valarray(const slice_array<value_type>& __sa) @@ -2990,7 +2982,7 @@ valarray<_Tp>::operator=(const valarray& __v) return *this; } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -3005,10 +2997,6 @@ valarray<_Tp>::operator=(valarray&& __v) _NOEXCEPT return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS - template <class _Tp> inline valarray<_Tp>& @@ -3020,7 +3008,7 @@ valarray<_Tp>::operator=(initializer_list<value_type> __il) return *this; } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -3132,7 +3120,7 @@ valarray<_Tp>::operator[](const gslice& __gs) return gslice_array<value_type>(__gs, *this); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -3150,7 +3138,7 @@ valarray<_Tp>::operator[](gslice&& __gs) return gslice_array<value_type>(move(__gs), *this); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -3168,7 +3156,7 @@ valarray<_Tp>::operator[](const valarray<bool>& __vb) return mask_array<value_type>(__vb, *this); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -3186,7 +3174,7 @@ valarray<_Tp>::operator[](valarray<bool>&& __vb) return mask_array<value_type>(move(__vb), *this); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -3204,7 +3192,7 @@ valarray<_Tp>::operator[](const valarray<size_t>& __vs) return indirect_array<value_type>(__vs, *this); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _Tp> inline @@ -3222,7 +3210,7 @@ valarray<_Tp>::operator[](valarray<size_t>&& __vs) return indirect_array<value_type>(move(__vs), *this); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _Tp> valarray<_Tp> diff --git a/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp index a2e53629f97..8831ca1d6ee 100644 --- a/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.literals/literals.pass.cpp @@ -14,6 +14,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + int main() { using namespace std::literals::complex_literals; diff --git a/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp b/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp index 67e0fa131fd..6cc911d4e5e 100644 --- a/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp @@ -12,6 +12,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { std::complex<float> foo = 1.0if; // should fail w/conversion operator not found diff --git a/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp index b4d870fad11..25b9ce62cc1 100644 --- a/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.members/construct.pass.cpp @@ -14,6 +14,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + template <class T> void test() @@ -38,7 +40,7 @@ test() assert(c.real() == 10.5); assert(c.imag() == -9.5); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<T> c; static_assert(c.real() == 0, ""); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp index e8d07ce287d..ac26e3c9eed 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<double> cf(cd); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp index 298aaa3a7a8..3bb01ac4650 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<double> cf = cd; diff --git a/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp index 6ff74a2cdef..97c2580249c 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<long double> cd(2.5, 3.5); constexpr std::complex<double> cf(cd); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp index 77ca9d7f2aa..3027d4cdcc0 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<double> cd(2.5, 3.5); constexpr std::complex<float> cf(cd); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp index 4fb11b4ca27..515e83dfc46 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<long double> cd(2.5, 3.5); constexpr std::complex<float> cf(cd); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp index dd10c808b90..4f24a1c6575 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<double> cd(2.5, 3.5); constexpr std::complex<long double> cf(cd); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp index aab539407d0..8cbd7a8a12c 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<double> cd(2.5, 3.5); constexpr std::complex<long double> cf = cd; diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp index a5f5101c4dc..7930548f9f3 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<long double> cf(cd); diff --git a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp index 25b93823f6e..22b9fd08ac2 100644 --- a/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<long double> cf = cd; diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp index 7a671a73eee..5122f44c3d8 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <valarray> // template<class T> class valarray; @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -54,5 +55,4 @@ int main() assert(v2[i][j] == a[i][j]); } } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp index 4dfbe11bde9..ce385e65c2a 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <valarray> // template<class T> class valarray; @@ -18,7 +20,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -37,5 +38,4 @@ int main() for (unsigned i = 0; i < N; ++i) assert(v[i] == a[i]); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp index f819f48b197..8cc523e2fc0 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp @@ -26,6 +26,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + template <class _Tp> void where(const _Tp &) {} diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp index 187a71edcd7..6076f934ff7 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp @@ -24,6 +24,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + void test1() { diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp index be5b4a9786a..c592b6df2d6 100644 --- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp @@ -25,6 +25,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + template <class _Tp> void where(const _Tp &) {} diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp index bc4494b9848..03183931709 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class IntType = int> @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; D d = {}; @@ -77,5 +78,4 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp index 1071305f4db..bd2a8c83d8e 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class IntType = int> @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; typedef D::param_type P; @@ -28,5 +29,4 @@ int main() assert(p.size() == 1); assert(p[0] == 1); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp index 79d8a0b71a9..1144bfed33f 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class IntType = int> @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; typedef D::param_type P; @@ -84,5 +85,4 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp index d4f339fe7f3..e901afc3974 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class RealType = double> @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_constant_distribution<> D; D d; @@ -31,5 +32,4 @@ int main() assert(dn.size() == 1); assert(dn[0] == 1); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp index 5708e45093c..ecc3c892236 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class RealType = double> @@ -27,7 +29,6 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_constant_distribution<> D; D d({}, f); @@ -74,5 +75,4 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp index fa6530979ed..c037338cdea 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class RealType = double> @@ -24,7 +26,6 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_constant_distribution<> D; typedef D::param_type P; @@ -75,5 +76,4 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp index 745bd6b97ec..99b0f5f4b27 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class RealType = double> @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_linear_distribution<> D; D d; @@ -32,5 +33,4 @@ int main() assert(dn[0] == 1); assert(dn[1] == 1); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp index 44c76f0cf6c..77371de453d 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class RealType = double> @@ -27,7 +29,6 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_linear_distribution<> D; D d({}, f); @@ -78,5 +79,4 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp index cfa416434a2..518a4f265ac 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // template<class RealType = double> @@ -24,7 +26,6 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_linear_distribution<> D; typedef D::param_type P; @@ -79,5 +80,4 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp index cd496fdbc5e..2080ac5f41d 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp @@ -25,6 +25,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + template <class _Tp> void where(const _Tp &) {} diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp index 3a16d62d728..f7834afd445 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp @@ -40,6 +40,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + template <class _Tp> void where(const _Tp &) {} diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp index b3f12e72383..6b8b4eed97a 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp @@ -28,6 +28,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + template <class _Tp> void where(const _Tp &) {} diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp index d4ee9c14d52..c0921d91366 100644 --- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <random> // class seed_seq; @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::seed_seq s= {5, 4, 3, 2, 1}; assert(s.size() == 5); unsigned b[5] = {0}; @@ -29,5 +30,4 @@ int main() assert(b[2] == 3); assert(b[3] == 2); assert(b[4] == 1); -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } |