aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/valarray
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/valarray')
-rw-r--r--libcxx/include/valarray59
1 files changed, 32 insertions, 27 deletions
diff --git a/libcxx/include/valarray b/libcxx/include/valarray
index 6f8a3b84197b..92521ed3819c 100644
--- a/libcxx/include/valarray
+++ b/libcxx/include/valarray
@@ -353,6 +353,7 @@ template <class T> unspecified2 end(const valarray<T>& v);
#include <__functional/operations.h>
#include <__memory/allocator.h>
#include <__memory/uninitialized_algorithms.h>
+#include <__type_traits/remove_reference.h>
#include <__utility/move.h>
#include <__utility/swap.h>
#include <cmath>
@@ -360,12 +361,9 @@ template <class T> unspecified2 end(const valarray<T>& v);
#include <new>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <functional>
-#endif
-
// standard-mandated includes
+
+// [valarray.syn]
#include <initializer_list>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -548,7 +546,7 @@ struct __abs_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return abs(__x);}
+ {return std::abs(__x);}
};
template <class _Tp>
@@ -557,7 +555,7 @@ struct __acos_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return acos(__x);}
+ {return std::acos(__x);}
};
template <class _Tp>
@@ -566,7 +564,7 @@ struct __asin_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return asin(__x);}
+ {return std::asin(__x);}
};
template <class _Tp>
@@ -575,7 +573,7 @@ struct __atan_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return atan(__x);}
+ {return std::atan(__x);}
};
template <class _Tp>
@@ -584,7 +582,7 @@ struct __atan2_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
- {return atan2(__x, __y);}
+ {return std::atan2(__x, __y);}
};
template <class _Tp>
@@ -593,7 +591,7 @@ struct __cos_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return cos(__x);}
+ {return std::cos(__x);}
};
template <class _Tp>
@@ -602,7 +600,7 @@ struct __cosh_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return cosh(__x);}
+ {return std::cosh(__x);}
};
template <class _Tp>
@@ -611,7 +609,7 @@ struct __exp_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return exp(__x);}
+ {return std::exp(__x);}
};
template <class _Tp>
@@ -620,7 +618,7 @@ struct __log_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return log(__x);}
+ {return std::log(__x);}
};
template <class _Tp>
@@ -629,7 +627,7 @@ struct __log10_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return log10(__x);}
+ {return std::log10(__x);}
};
template <class _Tp>
@@ -638,7 +636,7 @@ struct __pow_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
- {return pow(__x, __y);}
+ {return std::pow(__x, __y);}
};
template <class _Tp>
@@ -647,7 +645,7 @@ struct __sin_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return sin(__x);}
+ {return std::sin(__x);}
};
template <class _Tp>
@@ -656,7 +654,7 @@ struct __sinh_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return sinh(__x);}
+ {return std::sinh(__x);}
};
template <class _Tp>
@@ -665,7 +663,7 @@ struct __sqrt_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return sqrt(__x);}
+ {return std::sqrt(__x);}
};
template <class _Tp>
@@ -674,7 +672,7 @@ struct __tan_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return tan(__x);}
+ {return std::tan(__x);}
};
template <class _Tp>
@@ -683,13 +681,13 @@ struct __tanh_expr
typedef _Tp __result_type;
_LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
- {return tanh(__x);}
+ {return std::tanh(__x);}
};
template <class _ValExpr>
class __slice_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -729,7 +727,7 @@ class __indirect_expr;
template <class _ValExpr>
class __shift_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -772,7 +770,7 @@ public:
template <class _ValExpr>
class __cshift_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -2247,7 +2245,7 @@ mask_array<_Tp>::operator=(const value_type& __x) const
template <class _ValExpr>
class __mask_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -2610,7 +2608,7 @@ indirect_array<_Tp>::operator=(const value_type& __x) const
template <class _ValExpr>
class __indirect_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -2650,7 +2648,7 @@ public:
template<class _ValExpr>
class __val_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
_ValExpr __expr_;
public:
@@ -4932,4 +4930,11 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <concepts>
+# include <cstring>
+# include <functional>
+#endif
+
#endif // _LIBCPP_VALARRAY