Revert "Revert "Merge to upstream r304942.""
This reverts commit 38a0d5af7e.
Test: make checkbuild
Test: ./run_tests.py
Test: ./run_tests.py --bitness 64
This commit is contained in:
@@ -347,12 +347,14 @@ template <class T> unspecified2 end(const valarray<T>& v);
|
||||
#include <functional>
|
||||
#include <new>
|
||||
|
||||
#include <__undef_min_max>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _Tp> class _LIBCPP_TEMPLATE_VIS valarray;
|
||||
@@ -807,13 +809,11 @@ public:
|
||||
valarray(const value_type& __x, size_t __n);
|
||||
valarray(const value_type* __p, size_t __n);
|
||||
valarray(const valarray& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
valarray(valarray&& __v) _NOEXCEPT;
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
valarray(initializer_list<value_type> __il);
|
||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
valarray(const slice_array<value_type>& __sa);
|
||||
valarray(const gslice_array<value_type>& __ga);
|
||||
valarray(const mask_array<value_type>& __ma);
|
||||
@@ -823,14 +823,12 @@ public:
|
||||
|
||||
// assignment:
|
||||
valarray& operator=(const valarray& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
valarray& operator=(valarray&& __v) _NOEXCEPT;
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
valarray& operator=(initializer_list<value_type>);
|
||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
valarray& operator=(const value_type& __x);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -861,32 +859,32 @@ public:
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
gslice_array<value_type> operator[](const gslice& __gs);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
gslice_array<value_type> operator[](gslice&& __gs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__val_expr<__mask_expr<const valarray&> > operator[](const valarray<bool>& __vb) const;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
mask_array<value_type> operator[](const valarray<bool>& __vb);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__val_expr<__mask_expr<const valarray&> > operator[](valarray<bool>&& __vb) const;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
mask_array<value_type> operator[](valarray<bool>&& __vb);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
indirect_array<value_type> operator[](const valarray<size_t>& __vs);
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
indirect_array<value_type> operator[](valarray<size_t>&& __vs);
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
// unary operators:
|
||||
valarray operator+() const;
|
||||
@@ -1480,7 +1478,7 @@ public:
|
||||
__stride_(__stride)
|
||||
{__init(__start);}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
gslice(size_t __start, const valarray<size_t>& __size,
|
||||
@@ -1503,7 +1501,7 @@ public:
|
||||
__stride_(move(__stride))
|
||||
{__init(__start);}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
// gslice(const gslice&) = default;
|
||||
// gslice(gslice&&) = default;
|
||||
@@ -1656,12 +1654,12 @@ private:
|
||||
__1d_(__gs.__1d_)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
gslice_array(gslice&& __gs, const valarray<value_type>& __v)
|
||||
: __vp_(const_cast<value_type*>(__v.__begin_)),
|
||||
__1d_(move(__gs.__1d_))
|
||||
{}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class> friend class valarray;
|
||||
};
|
||||
@@ -2353,7 +2351,7 @@ private:
|
||||
__1d_(__ia)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
|
||||
@@ -2361,7 +2359,7 @@ private:
|
||||
__1d_(move(__ia))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class> friend class valarray;
|
||||
};
|
||||
@@ -2572,7 +2570,7 @@ private:
|
||||
__1d_(__ia)
|
||||
{}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
|
||||
@@ -2580,7 +2578,7 @@ private:
|
||||
__1d_(move(__ia))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -2814,7 +2812,7 @@ valarray<_Tp>::valarray(const valarray& __v)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -2825,10 +2823,6 @@ valarray<_Tp>::valarray(valarray&& __v) _NOEXCEPT
|
||||
__v.__begin_ = __v.__end_ = nullptr;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
|
||||
template <class _Tp>
|
||||
valarray<_Tp>::valarray(initializer_list<value_type> __il)
|
||||
: __begin_(0),
|
||||
@@ -2855,7 +2849,7 @@ valarray<_Tp>::valarray(initializer_list<value_type> __il)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
|
||||
@@ -2990,7 +2984,7 @@ valarray<_Tp>::operator=(const valarray& __v)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -3005,10 +2999,6 @@ valarray<_Tp>::operator=(valarray&& __v) _NOEXCEPT
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
valarray<_Tp>&
|
||||
@@ -3020,7 +3010,7 @@ valarray<_Tp>::operator=(initializer_list<value_type> __il)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -3132,7 +3122,7 @@ valarray<_Tp>::operator[](const gslice& __gs)
|
||||
return gslice_array<value_type>(__gs, *this);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -3150,7 +3140,7 @@ valarray<_Tp>::operator[](gslice&& __gs)
|
||||
return gslice_array<value_type>(move(__gs), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -3168,7 +3158,7 @@ valarray<_Tp>::operator[](const valarray<bool>& __vb)
|
||||
return mask_array<value_type>(__vb, *this);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -3186,7 +3176,7 @@ valarray<_Tp>::operator[](valarray<bool>&& __vb)
|
||||
return mask_array<value_type>(move(__vb), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -3204,7 +3194,7 @@ valarray<_Tp>::operator[](const valarray<size_t>& __vs)
|
||||
return indirect_array<value_type>(__vs, *this);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
inline
|
||||
@@ -3222,7 +3212,7 @@ valarray<_Tp>::operator[](valarray<size_t>&& __vs)
|
||||
return indirect_array<value_type>(move(__vs), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp>
|
||||
valarray<_Tp>
|
||||
@@ -4877,4 +4867,6 @@ end(const valarray<_Tp>& __v)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP_VALARRAY
|
||||
|
||||
Reference in New Issue
Block a user