Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers
llvm-svn: 300632
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 69154d6e071e01fe6d6745e38e565c9d8d3fe543
diff --git a/include/random b/include/random
index 835ebdb..83fff90 100644
--- a/include/random
+++ b/include/random
@@ -2826,7 +2826,7 @@
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 @@
_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 @@
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 @@
_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 @@
// 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 @@
_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 @@
// 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 @@
{
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 @@
_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 @@
_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 @@
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 @@
_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 @@
}
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#ifndef _LIBCPP_CXX03_LANG
template<class _RealType>
template<class _UnaryOperation>
@@ -6293,7 +6293,7 @@
}
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif // _LIBCPP_CXX03_LANG
template<class _RealType>
template<class _UnaryOperation>
@@ -6402,10 +6402,10 @@
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 @@
_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 @@
}
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#ifndef _LIBCPP_CXX03_LANG
template<class _RealType>
template<class _UnaryOperation>
@@ -6620,7 +6620,7 @@
}
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif // _LIBCPP_CXX03_LANG
template<class _RealType>
template<class _UnaryOperation>
diff --git a/include/valarray b/include/valarray
index f0f1f62..f8e19ac 100644
--- a/include/valarray
+++ b/include/valarray
@@ -807,13 +807,11 @@
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 @@
// 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 @@
__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 @@
__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 @@
__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 @@
__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 @@
__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 @@
__1d_(move(__ia))
{}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class> friend class valarray;
};
@@ -2572,7 +2568,7 @@
__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 @@
__1d_(move(__ia))
{}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
public:
_LIBCPP_INLINE_VISIBILITY
@@ -2814,7 +2810,7 @@
}
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
inline
@@ -2825,10 +2821,6 @@
__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 @@
}
}
-#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 @@
return *this;
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
inline
@@ -3005,10 +2997,6 @@
return *this;
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
template <class _Tp>
inline
valarray<_Tp>&
@@ -3020,7 +3008,7 @@
return *this;
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp>
inline
@@ -3132,7 +3120,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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/test/std/numerics/complex.number/complex.literals/literals.pass.cpp b/test/std/numerics/complex.number/complex.literals/literals.pass.cpp
index a2e5362..8831ca1 100644
--- a/test/std/numerics/complex.number/complex.literals/literals.pass.cpp
+++ b/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/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp b/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp
index 67e0fa1..6cc911d 100644
--- a/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp
+++ b/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/test/std/numerics/complex.number/complex.members/construct.pass.cpp b/test/std/numerics/complex.number/complex.members/construct.pass.cpp
index b4d870f..25b9ce6 100644
--- a/test/std/numerics/complex.number/complex.members/construct.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp
index e8d07ce..ac26e3c 100644
--- a/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp b/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp
index 298aaa3..3bb01ac 100644
--- a/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp
index 6ff74a2..97c2580 100644
--- a/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp
index 77ca9d7..3027d4c 100644
--- a/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp
index 4fb11b4..515e83d 100644
--- a/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp
index dd10c80..4f24a1c 100644
--- a/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp
index aab5394..8cbd7a8 100644
--- a/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp
index a5f5101..7930548 100644
--- a/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp
index 25b9382..22b9fd0 100644
--- a/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp
+++ b/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 @@
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/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp b/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp
index 7a671a7..5122f44 100644
--- a/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp
+++ b/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 @@
assert(v2[i][j] == a[i][j]);
}
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp b/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp
index 4dfbe11..ce385e6 100644
--- a/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp
+++ b/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 @@
for (unsigned i = 0; i < N; ++i)
assert(v[i] == a[i]);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp b/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp
index f819f48..8cc523e 100644
--- a/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp
+++ b/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/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp b/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp
index 187a71e..6076f93 100644
--- a/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp
+++ b/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/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp b/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp
index be5b4a9..c592b6d 100644
--- a/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp
+++ b/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/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp
index bc4494b..0318393 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp
+++ b/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 @@
assert(p[1] == 0);
assert(p[2] == 1);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp
index 1071305..bd2a8c8 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp
+++ b/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 @@
assert(p.size() == 1);
assert(p[0] == 1);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp
index 79d8a0b..1144bfe 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp
+++ b/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 @@
assert(p[1] == 0);
assert(p[2] == 1);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp
index d4f339f..e901afc 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp
+++ b/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 @@
assert(dn.size() == 1);
assert(dn[0] == 1);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp
index 5708e45..ecc3c89 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp
+++ b/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 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef std::piecewise_constant_distribution<> D;
D d({}, f);
@@ -74,5 +75,4 @@
assert(dn[0] == 0.203125);
assert(dn[1] == 0.1484375);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp
index fa65309..c037338 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp
+++ b/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 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef std::piecewise_constant_distribution<> D;
typedef D::param_type P;
@@ -75,5 +76,4 @@
assert(dn[0] == 0.203125);
assert(dn[1] == 0.1484375);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp
index 745bd6b..99b0f5f 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp
+++ b/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 @@
assert(dn[0] == 1);
assert(dn[1] == 1);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp
index 44c76f0..77371de 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp
+++ b/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 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef std::piecewise_linear_distribution<> D;
D d({}, f);
@@ -78,5 +79,4 @@
assert(dn[1] == 0.125);
assert(dn[2] == 0.175);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp
index cfa4164..518a4f2 100644
--- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp
+++ b/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 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef std::piecewise_linear_distribution<> D;
typedef D::param_type P;
@@ -79,5 +80,4 @@
assert(dn[1] == 0.125);
assert(dn[2] == 0.175);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp b/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
index cd496fd..2080ac5 100644
--- a/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
+++ b/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/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp b/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp
index 3a16d62..f7834af 100644
--- a/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp
+++ b/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/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp b/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp
index b3f12e7..6b8b4ee 100644
--- a/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp
+++ b/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/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp b/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp
index d4ee9c1..c0921d9 100644
--- a/test/std/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp
+++ b/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 @@
assert(b[2] == 3);
assert(b[3] == 2);
assert(b[4] == 1);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}