Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300632 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2826,7 +2826,7 @@ public:
|
|||||||
static _LIBCPP_CONSTEXPR const size_t block_size = __p;
|
static _LIBCPP_CONSTEXPR const size_t block_size = __p;
|
||||||
static _LIBCPP_CONSTEXPR const size_t used_block = __r;
|
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 _Min = _Engine::_Min;
|
||||||
static const result_type _Max = _Engine::_Max;
|
static const result_type _Max = _Engine::_Max;
|
||||||
#else
|
#else
|
||||||
@@ -2845,11 +2845,11 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit discard_block_engine(const _Engine& __e)
|
explicit discard_block_engine(const _Engine& __e)
|
||||||
: __e_(__e), __n_(0) {}
|
: __e_(__e), __n_(0) {}
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit discard_block_engine(_Engine&& __e)
|
explicit discard_block_engine(_Engine&& __e)
|
||||||
: __e_(_VSTD::move(__e)), __n_(0) {}
|
: __e_(_VSTD::move(__e)), __n_(0) {}
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
|
explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
|
||||||
template<class _Sseq>
|
template<class _Sseq>
|
||||||
@@ -3014,7 +3014,7 @@ private:
|
|||||||
result_type,
|
result_type,
|
||||||
_Engine_result_type
|
_Engine_result_type
|
||||||
>::type _Working_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
|
static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min
|
||||||
+ _Working_result_type(1);
|
+ _Working_result_type(1);
|
||||||
#else
|
#else
|
||||||
@@ -3055,11 +3055,11 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit independent_bits_engine(const _Engine& __e)
|
explicit independent_bits_engine(const _Engine& __e)
|
||||||
: __e_(__e) {}
|
: __e_(__e) {}
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit independent_bits_engine(_Engine&& __e)
|
explicit independent_bits_engine(_Engine&& __e)
|
||||||
: __e_(_VSTD::move(__e)) {}
|
: __e_(_VSTD::move(__e)) {}
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
|
explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
|
||||||
template<class _Sseq>
|
template<class _Sseq>
|
||||||
@@ -3264,7 +3264,7 @@ public:
|
|||||||
// engine characteristics
|
// engine characteristics
|
||||||
static _LIBCPP_CONSTEXPR const size_t table_size = __k;
|
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 _Min = _Engine::_Min;
|
||||||
static const result_type _Max = _Engine::_Max;
|
static const result_type _Max = _Engine::_Max;
|
||||||
#else
|
#else
|
||||||
@@ -3285,11 +3285,11 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit shuffle_order_engine(const _Engine& __e)
|
explicit shuffle_order_engine(const _Engine& __e)
|
||||||
: __e_(__e) {__init();}
|
: __e_(__e) {__init();}
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit shuffle_order_engine(_Engine&& __e)
|
explicit shuffle_order_engine(_Engine&& __e)
|
||||||
: __e_(_VSTD::move(__e)) {__init();}
|
: __e_(_VSTD::move(__e)) {__init();}
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
|
explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
|
||||||
template<class _Sseq>
|
template<class _Sseq>
|
||||||
@@ -3526,11 +3526,11 @@ public:
|
|||||||
// constructors
|
// constructors
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
seed_seq() _NOEXCEPT {}
|
seed_seq() _NOEXCEPT {}
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
template<class _Tp>
|
template<class _Tp>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
seed_seq(initializer_list<_Tp> __il) {init(__il.begin(), __il.end());}
|
seed_seq(initializer_list<_Tp> __il) {init(__il.begin(), __il.end());}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template<class _InputIterator>
|
template<class _InputIterator>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
@@ -3637,7 +3637,7 @@ generate_canonical(_URNG& __g)
|
|||||||
{
|
{
|
||||||
const size_t _Dt = numeric_limits<_RealType>::digits;
|
const size_t _Dt = numeric_limits<_RealType>::digits;
|
||||||
const size_t __b = _Dt < __bits ? _Dt : __bits;
|
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;
|
const size_t __logR = __log2<uint64_t, _URNG::_Max - _URNG::_Min + uint64_t(1)>::value;
|
||||||
#else
|
#else
|
||||||
const size_t __logR = __log2<uint64_t, _URNG::max() - _URNG::min() + uint64_t(1)>::value;
|
const size_t __logR = __log2<uint64_t, _URNG::max() - _URNG::min() + uint64_t(1)>::value;
|
||||||
@@ -5851,11 +5851,11 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
param_type(_InputIterator __f, _InputIterator __l)
|
param_type(_InputIterator __f, _InputIterator __l)
|
||||||
: __p_(__f, __l) {__init();}
|
: __p_(__f, __l) {__init();}
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
param_type(initializer_list<double> __wl)
|
param_type(initializer_list<double> __wl)
|
||||||
: __p_(__wl.begin(), __wl.end()) {__init();}
|
: __p_(__wl.begin(), __wl.end()) {__init();}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
param_type(size_t __nw, double __xmin, double __xmax,
|
param_type(size_t __nw, double __xmin, double __xmax,
|
||||||
_UnaryOperation __fw);
|
_UnaryOperation __fw);
|
||||||
@@ -5898,11 +5898,11 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
discrete_distribution(_InputIterator __f, _InputIterator __l)
|
discrete_distribution(_InputIterator __f, _InputIterator __l)
|
||||||
: __p_(__f, __l) {}
|
: __p_(__f, __l) {}
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
discrete_distribution(initializer_list<double> __wl)
|
discrete_distribution(initializer_list<double> __wl)
|
||||||
: __p_(__wl) {}
|
: __p_(__wl) {}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
discrete_distribution(size_t __nw, double __xmin, double __xmax,
|
discrete_distribution(size_t __nw, double __xmin, double __xmax,
|
||||||
@@ -6079,10 +6079,10 @@ public:
|
|||||||
template<class _InputIteratorB, class _InputIteratorW>
|
template<class _InputIteratorB, class _InputIteratorW>
|
||||||
param_type(_InputIteratorB __fB, _InputIteratorB __lB,
|
param_type(_InputIteratorB __fB, _InputIteratorB __lB,
|
||||||
_InputIteratorW __fW);
|
_InputIteratorW __fW);
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
|
param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
param_type(size_t __nw, result_type __xmin, result_type __xmax,
|
param_type(size_t __nw, result_type __xmin, result_type __xmax,
|
||||||
_UnaryOperation __fw);
|
_UnaryOperation __fw);
|
||||||
@@ -6132,13 +6132,13 @@ public:
|
|||||||
_InputIteratorW __fW)
|
_InputIteratorW __fW)
|
||||||
: __p_(__fB, __lB, __fW) {}
|
: __p_(__fB, __lB, __fW) {}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
piecewise_constant_distribution(initializer_list<result_type> __bl,
|
piecewise_constant_distribution(initializer_list<result_type> __bl,
|
||||||
_UnaryOperation __fw)
|
_UnaryOperation __fw)
|
||||||
: __p_(__bl, __fw) {}
|
: __p_(__bl, __fw) {}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_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 _RealType>
|
||||||
template<class _UnaryOperation>
|
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 _RealType>
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
@@ -6402,10 +6402,10 @@ public:
|
|||||||
template<class _InputIteratorB, class _InputIteratorW>
|
template<class _InputIteratorB, class _InputIteratorW>
|
||||||
param_type(_InputIteratorB __fB, _InputIteratorB __lB,
|
param_type(_InputIteratorB __fB, _InputIteratorB __lB,
|
||||||
_InputIteratorW __fW);
|
_InputIteratorW __fW);
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
|
param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
param_type(size_t __nw, result_type __xmin, result_type __xmax,
|
param_type(size_t __nw, result_type __xmin, result_type __xmax,
|
||||||
_UnaryOperation __fw);
|
_UnaryOperation __fw);
|
||||||
@@ -6455,13 +6455,13 @@ public:
|
|||||||
_InputIteratorW __fW)
|
_InputIteratorW __fW)
|
||||||
: __p_(__fB, __lB, __fW) {}
|
: __p_(__fB, __lB, __fW) {}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
piecewise_linear_distribution(initializer_list<result_type> __bl,
|
piecewise_linear_distribution(initializer_list<result_type> __bl,
|
||||||
_UnaryOperation __fw)
|
_UnaryOperation __fw)
|
||||||
: __p_(__bl, __fw) {}
|
: __p_(__bl, __fw) {}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_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 _RealType>
|
||||||
template<class _UnaryOperation>
|
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 _RealType>
|
||||||
template<class _UnaryOperation>
|
template<class _UnaryOperation>
|
||||||
|
|||||||
@@ -807,13 +807,11 @@ public:
|
|||||||
valarray(const value_type& __x, size_t __n);
|
valarray(const value_type& __x, size_t __n);
|
||||||
valarray(const value_type* __p, size_t __n);
|
valarray(const value_type* __p, size_t __n);
|
||||||
valarray(const valarray& __v);
|
valarray(const valarray& __v);
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
valarray(valarray&& __v) _NOEXCEPT;
|
valarray(valarray&& __v) _NOEXCEPT;
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
valarray(initializer_list<value_type> __il);
|
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 slice_array<value_type>& __sa);
|
||||||
valarray(const gslice_array<value_type>& __ga);
|
valarray(const gslice_array<value_type>& __ga);
|
||||||
valarray(const mask_array<value_type>& __ma);
|
valarray(const mask_array<value_type>& __ma);
|
||||||
@@ -823,14 +821,12 @@ public:
|
|||||||
|
|
||||||
// assignment:
|
// assignment:
|
||||||
valarray& operator=(const valarray& __v);
|
valarray& operator=(const valarray& __v);
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
valarray& operator=(valarray&& __v) _NOEXCEPT;
|
valarray& operator=(valarray&& __v) _NOEXCEPT;
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
valarray& operator=(initializer_list<value_type>);
|
valarray& operator=(initializer_list<value_type>);
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
valarray& operator=(const value_type& __x);
|
valarray& operator=(const value_type& __x);
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
@@ -861,32 +857,32 @@ public:
|
|||||||
__val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const;
|
__val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
gslice_array<value_type> operator[](const gslice& __gs);
|
gslice_array<value_type> operator[](const gslice& __gs);
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const;
|
__val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
gslice_array<value_type> operator[](gslice&& __gs);
|
gslice_array<value_type> operator[](gslice&& __gs);
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__val_expr<__mask_expr<const valarray&> > operator[](const valarray<bool>& __vb) const;
|
__val_expr<__mask_expr<const valarray&> > operator[](const valarray<bool>& __vb) const;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
mask_array<value_type> operator[](const valarray<bool>& __vb);
|
mask_array<value_type> operator[](const valarray<bool>& __vb);
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__val_expr<__mask_expr<const valarray&> > operator[](valarray<bool>&& __vb) const;
|
__val_expr<__mask_expr<const valarray&> > operator[](valarray<bool>&& __vb) const;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
mask_array<value_type> operator[](valarray<bool>&& __vb);
|
mask_array<value_type> operator[](valarray<bool>&& __vb);
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const;
|
__val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
indirect_array<value_type> operator[](const valarray<size_t>& __vs);
|
indirect_array<value_type> operator[](const valarray<size_t>& __vs);
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const;
|
__val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
indirect_array<value_type> operator[](valarray<size_t>&& __vs);
|
indirect_array<value_type> operator[](valarray<size_t>&& __vs);
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
// unary operators:
|
// unary operators:
|
||||||
valarray operator+() const;
|
valarray operator+() const;
|
||||||
@@ -1480,7 +1476,7 @@ public:
|
|||||||
__stride_(__stride)
|
__stride_(__stride)
|
||||||
{__init(__start);}
|
{__init(__start);}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
gslice(size_t __start, const valarray<size_t>& __size,
|
gslice(size_t __start, const valarray<size_t>& __size,
|
||||||
@@ -1503,7 +1499,7 @@ public:
|
|||||||
__stride_(move(__stride))
|
__stride_(move(__stride))
|
||||||
{__init(__start);}
|
{__init(__start);}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
// gslice(const gslice&) = default;
|
// gslice(const gslice&) = default;
|
||||||
// gslice(gslice&&) = default;
|
// gslice(gslice&&) = default;
|
||||||
@@ -1656,12 +1652,12 @@ private:
|
|||||||
__1d_(__gs.__1d_)
|
__1d_(__gs.__1d_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
gslice_array(gslice&& __gs, const valarray<value_type>& __v)
|
gslice_array(gslice&& __gs, const valarray<value_type>& __v)
|
||||||
: __vp_(const_cast<value_type*>(__v.__begin_)),
|
: __vp_(const_cast<value_type*>(__v.__begin_)),
|
||||||
__1d_(move(__gs.__1d_))
|
__1d_(move(__gs.__1d_))
|
||||||
{}
|
{}
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class> friend class valarray;
|
template <class> friend class valarray;
|
||||||
};
|
};
|
||||||
@@ -2353,7 +2349,7 @@ private:
|
|||||||
__1d_(__ia)
|
__1d_(__ia)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
|
indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
|
||||||
@@ -2361,7 +2357,7 @@ private:
|
|||||||
__1d_(move(__ia))
|
__1d_(move(__ia))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class> friend class valarray;
|
template <class> friend class valarray;
|
||||||
};
|
};
|
||||||
@@ -2572,7 +2568,7 @@ private:
|
|||||||
__1d_(__ia)
|
__1d_(__ia)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
|
__indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
|
||||||
@@ -2580,7 +2576,7 @@ private:
|
|||||||
__1d_(move(__ia))
|
__1d_(move(__ia))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_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>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -2825,10 +2821,6 @@ valarray<_Tp>::valarray(valarray&& __v) _NOEXCEPT
|
|||||||
__v.__begin_ = __v.__end_ = nullptr;
|
__v.__begin_ = __v.__end_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
valarray<_Tp>::valarray(initializer_list<value_type> __il)
|
valarray<_Tp>::valarray(initializer_list<value_type> __il)
|
||||||
: __begin_(0),
|
: __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>
|
template <class _Tp>
|
||||||
valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
|
valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
|
||||||
@@ -2990,7 +2982,7 @@ valarray<_Tp>::operator=(const valarray& __v)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -3005,10 +2997,6 @@ valarray<_Tp>::operator=(valarray&& __v) _NOEXCEPT
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
valarray<_Tp>&
|
valarray<_Tp>&
|
||||||
@@ -3020,7 +3008,7 @@ valarray<_Tp>::operator=(initializer_list<value_type> __il)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -3132,7 +3120,7 @@ valarray<_Tp>::operator[](const gslice& __gs)
|
|||||||
return gslice_array<value_type>(__gs, *this);
|
return gslice_array<value_type>(__gs, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -3150,7 +3138,7 @@ valarray<_Tp>::operator[](gslice&& __gs)
|
|||||||
return gslice_array<value_type>(move(__gs), *this);
|
return gslice_array<value_type>(move(__gs), *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -3168,7 +3156,7 @@ valarray<_Tp>::operator[](const valarray<bool>& __vb)
|
|||||||
return mask_array<value_type>(__vb, *this);
|
return mask_array<value_type>(__vb, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -3186,7 +3174,7 @@ valarray<_Tp>::operator[](valarray<bool>&& __vb)
|
|||||||
return mask_array<value_type>(move(__vb), *this);
|
return mask_array<value_type>(move(__vb), *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -3204,7 +3192,7 @@ valarray<_Tp>::operator[](const valarray<size_t>& __vs)
|
|||||||
return indirect_array<value_type>(__vs, *this);
|
return indirect_array<value_type>(__vs, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline
|
inline
|
||||||
@@ -3222,7 +3210,7 @@ valarray<_Tp>::operator[](valarray<size_t>&& __vs)
|
|||||||
return indirect_array<value_type>(move(__vs), *this);
|
return indirect_array<value_type>(move(__vs), *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
valarray<_Tp>
|
valarray<_Tp>
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
using namespace std::literals::complex_literals;
|
using namespace std::literals::complex_literals;
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
std::complex<float> foo = 1.0if; // should fail w/conversion operator not found
|
std::complex<float> foo = 1.0if; // should fail w/conversion operator not found
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void
|
void
|
||||||
test()
|
test()
|
||||||
@@ -38,7 +40,7 @@ test()
|
|||||||
assert(c.real() == 10.5);
|
assert(c.real() == 10.5);
|
||||||
assert(c.imag() == -9.5);
|
assert(c.imag() == -9.5);
|
||||||
}
|
}
|
||||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
#if TEST_STD_VER >= 11
|
||||||
{
|
{
|
||||||
constexpr std::complex<T> c;
|
constexpr std::complex<T> c;
|
||||||
static_assert(c.real() == 0, "");
|
static_assert(c.real() == 0, "");
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<float> cd(2.5, 3.5);
|
||||||
constexpr std::complex<double> cf(cd);
|
constexpr std::complex<double> cf(cd);
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<float> cd(2.5, 3.5);
|
||||||
constexpr std::complex<double> cf = cd;
|
constexpr std::complex<double> cf = cd;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<long double> cd(2.5, 3.5);
|
||||||
constexpr std::complex<double> cf(cd);
|
constexpr std::complex<double> cf(cd);
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<double> cd(2.5, 3.5);
|
||||||
constexpr std::complex<float> cf(cd);
|
constexpr std::complex<float> cf(cd);
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<long double> cd(2.5, 3.5);
|
||||||
constexpr std::complex<float> cf(cd);
|
constexpr std::complex<float> cf(cd);
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<double> cd(2.5, 3.5);
|
||||||
constexpr std::complex<long double> cf(cd);
|
constexpr std::complex<long double> cf(cd);
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<double> cd(2.5, 3.5);
|
||||||
constexpr std::complex<long double> cf = cd;
|
constexpr std::complex<long double> cf = cd;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<float> cd(2.5, 3.5);
|
||||||
constexpr std::complex<long double> cf(cd);
|
constexpr std::complex<long double> cf(cd);
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -26,7 +28,7 @@ int main()
|
|||||||
assert(cf.real() == cd.real());
|
assert(cf.real() == cd.real());
|
||||||
assert(cf.imag() == cd.imag());
|
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<float> cd(2.5, 3.5);
|
||||||
constexpr std::complex<long double> cf = cd;
|
constexpr std::complex<long double> cf = cd;
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <valarray>
|
// <valarray>
|
||||||
|
|
||||||
// template<class T> class valarray;
|
// template<class T> class valarray;
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef int T;
|
typedef int T;
|
||||||
T a[] = {1, 2, 3, 4, 5};
|
T a[] = {1, 2, 3, 4, 5};
|
||||||
@@ -54,5 +55,4 @@ int main()
|
|||||||
assert(v2[i][j] == a[i][j]);
|
assert(v2[i][j] == a[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <valarray>
|
// <valarray>
|
||||||
|
|
||||||
// template<class T> class valarray;
|
// template<class T> class valarray;
|
||||||
@@ -18,7 +20,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef int T;
|
typedef int T;
|
||||||
T a[] = {1, 2, 3, 4, 5};
|
T a[] = {1, 2, 3, 4, 5};
|
||||||
@@ -37,5 +38,4 @@ int main()
|
|||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
assert(v[i] == a[i]);
|
assert(v[i] == a[i]);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
void where(const _Tp &) {}
|
void where(const _Tp &) {}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
test1()
|
test1()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
void where(const _Tp &) {}
|
void where(const _Tp &) {}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class IntType = int>
|
// template<class IntType = int>
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::discrete_distribution<> D;
|
typedef std::discrete_distribution<> D;
|
||||||
D d = {};
|
D d = {};
|
||||||
@@ -77,5 +78,4 @@ int main()
|
|||||||
assert(p[1] == 0);
|
assert(p[1] == 0);
|
||||||
assert(p[2] == 1);
|
assert(p[2] == 1);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class IntType = int>
|
// template<class IntType = int>
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::discrete_distribution<> D;
|
typedef std::discrete_distribution<> D;
|
||||||
typedef D::param_type P;
|
typedef D::param_type P;
|
||||||
@@ -28,5 +29,4 @@ int main()
|
|||||||
assert(p.size() == 1);
|
assert(p.size() == 1);
|
||||||
assert(p[0] == 1);
|
assert(p[0] == 1);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class IntType = int>
|
// template<class IntType = int>
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::discrete_distribution<> D;
|
typedef std::discrete_distribution<> D;
|
||||||
typedef D::param_type P;
|
typedef D::param_type P;
|
||||||
@@ -84,5 +85,4 @@ int main()
|
|||||||
assert(p[1] == 0);
|
assert(p[1] == 0);
|
||||||
assert(p[2] == 1);
|
assert(p[2] == 1);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class RealType = double>
|
// template<class RealType = double>
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::piecewise_constant_distribution<> D;
|
typedef std::piecewise_constant_distribution<> D;
|
||||||
D d;
|
D d;
|
||||||
@@ -31,5 +32,4 @@ int main()
|
|||||||
assert(dn.size() == 1);
|
assert(dn.size() == 1);
|
||||||
assert(dn[0] == 1);
|
assert(dn[0] == 1);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class RealType = double>
|
// template<class RealType = double>
|
||||||
@@ -27,7 +29,6 @@ double f(double x)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::piecewise_constant_distribution<> D;
|
typedef std::piecewise_constant_distribution<> D;
|
||||||
D d({}, f);
|
D d({}, f);
|
||||||
@@ -74,5 +75,4 @@ int main()
|
|||||||
assert(dn[0] == 0.203125);
|
assert(dn[0] == 0.203125);
|
||||||
assert(dn[1] == 0.1484375);
|
assert(dn[1] == 0.1484375);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class RealType = double>
|
// template<class RealType = double>
|
||||||
@@ -24,7 +26,6 @@ double f(double x)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::piecewise_constant_distribution<> D;
|
typedef std::piecewise_constant_distribution<> D;
|
||||||
typedef D::param_type P;
|
typedef D::param_type P;
|
||||||
@@ -75,5 +76,4 @@ int main()
|
|||||||
assert(dn[0] == 0.203125);
|
assert(dn[0] == 0.203125);
|
||||||
assert(dn[1] == 0.1484375);
|
assert(dn[1] == 0.1484375);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class RealType = double>
|
// template<class RealType = double>
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::piecewise_linear_distribution<> D;
|
typedef std::piecewise_linear_distribution<> D;
|
||||||
D d;
|
D d;
|
||||||
@@ -32,5 +33,4 @@ int main()
|
|||||||
assert(dn[0] == 1);
|
assert(dn[0] == 1);
|
||||||
assert(dn[1] == 1);
|
assert(dn[1] == 1);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class RealType = double>
|
// template<class RealType = double>
|
||||||
@@ -27,7 +29,6 @@ double f(double x)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::piecewise_linear_distribution<> D;
|
typedef std::piecewise_linear_distribution<> D;
|
||||||
D d({}, f);
|
D d({}, f);
|
||||||
@@ -78,5 +79,4 @@ int main()
|
|||||||
assert(dn[1] == 0.125);
|
assert(dn[1] == 0.125);
|
||||||
assert(dn[2] == 0.175);
|
assert(dn[2] == 0.175);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// template<class RealType = double>
|
// template<class RealType = double>
|
||||||
@@ -24,7 +26,6 @@ double f(double x)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::piecewise_linear_distribution<> D;
|
typedef std::piecewise_linear_distribution<> D;
|
||||||
typedef D::param_type P;
|
typedef D::param_type P;
|
||||||
@@ -79,5 +80,4 @@ int main()
|
|||||||
assert(dn[1] == 0.125);
|
assert(dn[1] == 0.125);
|
||||||
assert(dn[2] == 0.175);
|
assert(dn[2] == 0.175);
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
void where(const _Tp &) {}
|
void where(const _Tp &) {}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
void where(const _Tp &) {}
|
void where(const _Tp &) {}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
void where(const _Tp &) {}
|
void where(const _Tp &) {}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <random>
|
// <random>
|
||||||
|
|
||||||
// class seed_seq;
|
// class seed_seq;
|
||||||
@@ -19,7 +21,6 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
std::seed_seq s= {5, 4, 3, 2, 1};
|
std::seed_seq s= {5, 4, 3, 2, 1};
|
||||||
assert(s.size() == 5);
|
assert(s.size() == 5);
|
||||||
unsigned b[5] = {0};
|
unsigned b[5] = {0};
|
||||||
@@ -29,5 +30,4 @@ int main()
|
|||||||
assert(b[2] == 3);
|
assert(b[2] == 3);
|
||||||
assert(b[3] == 2);
|
assert(b[3] == 2);
|
||||||
assert(b[4] == 1);
|
assert(b[4] == 1);
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user