Index: libcxx/include/valarray =================================================================== --- libcxx/include/valarray +++ libcxx/include/valarray @@ -3779,1155 +3779,6 @@ { __x.swap(__y); } - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator*(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(multiplies(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator*(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(multiplies(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator*(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(multiplies(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator/(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(divides(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator/(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(divides(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator/(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(divides(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator%(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(modulus(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator%(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(modulus(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator%(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(modulus(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator+(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(plus(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator+(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(plus(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator+(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(plus(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator-(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(minus(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator-(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(minus(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator-(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(minus(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator^(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(bit_xor(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator^(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(bit_xor(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator^(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(bit_xor(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator&(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(bit_and(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator&(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(bit_and(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator&(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(bit_and(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator|(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(bit_or(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator|(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(bit_or(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator|(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(bit_or(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__bit_shift_left, _Expr1, _Expr2> > ->::type -operator<<(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp<__bit_shift_left, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(__bit_shift_left(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_left, - _Expr, __scalar_expr > > ->::type -operator<<(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__bit_shift_left, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(__bit_shift_left(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_left, - __scalar_expr, _Expr> > ->::type -operator<<(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__bit_shift_left, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__bit_shift_left(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__bit_shift_right, _Expr1, _Expr2> > ->::type -operator>>(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp<__bit_shift_right, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(__bit_shift_right(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_right, - _Expr, __scalar_expr > > ->::type -operator>>(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__bit_shift_right, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(__bit_shift_right(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__bit_shift_right, - __scalar_expr, _Expr> > ->::type -operator>>(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__bit_shift_right, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__bit_shift_right(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator&&(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(logical_and(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator&&(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(logical_and(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator&&(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(logical_and(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator||(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(logical_or(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator||(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(logical_or(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator||(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(logical_or(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator==(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(equal_to(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator==(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(equal_to(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator==(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(equal_to(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator!=(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(not_equal_to(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator!=(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(not_equal_to(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator!=(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(not_equal_to(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator<(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(less(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator<(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(less(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator<(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(less(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator>(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(greater(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator>(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(greater(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator>(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(greater(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator<=(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(less_equal(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator<=(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(less_equal(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator<=(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(less_equal(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp, _Expr1, _Expr2> > ->::type -operator>=(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(greater_equal(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - _Expr, __scalar_expr > > ->::type -operator>=(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(greater_equal(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp, - __scalar_expr, _Expr> > ->::type -operator>=(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(greater_equal(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__abs_expr, _Expr> > ->::type -abs(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__abs_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__abs_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__acos_expr, _Expr> > ->::type -acos(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__acos_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__acos_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__asin_expr, _Expr> > ->::type -asin(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__asin_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__asin_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__atan_expr, _Expr> > ->::type -atan(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__atan_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__atan_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__atan2_expr, _Expr1, _Expr2> > ->::type -atan2(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp<__atan2_expr, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(__atan2_expr(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__atan2_expr, - _Expr, __scalar_expr > > ->::type -atan2(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__atan2_expr, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(__atan2_expr(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__atan2_expr, - __scalar_expr, _Expr> > ->::type -atan2(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__atan2_expr, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__atan2_expr(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__cos_expr, _Expr> > ->::type -cos(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__cos_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__cos_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__cosh_expr, _Expr> > ->::type -cosh(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__cosh_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__cosh_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__exp_expr, _Expr> > ->::type -exp(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__exp_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__exp_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__log_expr, _Expr> > ->::type -log(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__log_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__log_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__log10_expr, _Expr> > ->::type -log10(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__log10_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__log10_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value, - __val_expr<_BinaryOp<__pow_expr, _Expr1, _Expr2> > ->::type -pow(const _Expr1& __x, const _Expr2& __y) -{ - typedef typename _Expr1::value_type value_type; - typedef _BinaryOp<__pow_expr, _Expr1, _Expr2> _Op; - return __val_expr<_Op>(_Op(__pow_expr(), __x, __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__pow_expr, - _Expr, __scalar_expr > > ->::type -pow(const _Expr& __x, const typename _Expr::value_type& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__pow_expr, _Expr, __scalar_expr > _Op; - return __val_expr<_Op>(_Op(__pow_expr(), - __x, __scalar_expr(__y, __x.size()))); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_BinaryOp<__pow_expr, - __scalar_expr, _Expr> > ->::type -pow(const typename _Expr::value_type& __x, const _Expr& __y) -{ - typedef typename _Expr::value_type value_type; - typedef _BinaryOp<__pow_expr, __scalar_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__pow_expr(), - __scalar_expr(__x, __y.size()), __y)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__sin_expr, _Expr> > ->::type -sin(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__sin_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__sin_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__sinh_expr, _Expr> > ->::type -sinh(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__sinh_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__sinh_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__sqrt_expr, _Expr> > ->::type -sqrt(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__sqrt_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__sqrt_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__tan_expr, _Expr> > ->::type -tan(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__tan_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__tan_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - __is_val_expr<_Expr>::value, - __val_expr<_UnaryOp<__tanh_expr, _Expr> > ->::type -tanh(const _Expr& __x) -{ - typedef typename _Expr::value_type value_type; - typedef _UnaryOp<__tanh_expr, _Expr> _Op; - return __val_expr<_Op>(_Op(__tanh_expr(), __x)); -} - -template -inline _LIBCPP_INLINE_VISIBILITY -_Tp* -begin(valarray<_Tp>& __v) -{ - return __v.__begin_; -} - -template -inline _LIBCPP_INLINE_VISIBILITY -const _Tp* -begin(const valarray<_Tp>& __v) -{ - return __v.__begin_; -} - -template -inline _LIBCPP_INLINE_VISIBILITY -_Tp* -end(valarray<_Tp>& __v) -{ - return __v.__end_; -} - -template -inline _LIBCPP_INLINE_VISIBILITY -const _Tp* -end(const valarray<_Tp>& __v) -{ - return __v.__end_; -} - _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS