aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/complex
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-02 21:17:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-07 17:46:17 +0000
commitfe013be447cd855ccaf6094a1d06aea570450629 (patch)
tree9adc1e0a5d25b6280995832bb29d592fb80554a6 /contrib/llvm-project/libcxx/include/complex
parent2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff)
Diffstat (limited to 'contrib/llvm-project/libcxx/include/complex')
-rw-r--r--contrib/llvm-project/libcxx/include/complex23
1 files changed, 15 insertions, 8 deletions
diff --git a/contrib/llvm-project/libcxx/include/complex b/contrib/llvm-project/libcxx/include/complex
index 760fbaa81128..d12cfa938dc3 100644
--- a/contrib/llvm-project/libcxx/include/complex
+++ b/contrib/llvm-project/libcxx/include/complex
@@ -148,12 +148,12 @@ template<class T> complex<T> operator/(const complex<T>&, const T&); //
template<class T> complex<T> operator/(const T&, const complex<T>&); // constexpr in C++20
template<class T> complex<T> operator+(const complex<T>&); // constexpr in C++20
template<class T> complex<T> operator-(const complex<T>&); // constexpr in C++20
-template<class T> bool operator==(const complex<T>&, const complex<T>&); // constexpr in C++14
-template<class T> bool operator==(const complex<T>&, const T&); // constexpr in C++14
-template<class T> bool operator==(const T&, const complex<T>&); // constexpr in C++14
-template<class T> bool operator!=(const complex<T>&, const complex<T>&); // constexpr in C++14
-template<class T> bool operator!=(const complex<T>&, const T&); // constexpr in C++14
-template<class T> bool operator!=(const T&, const complex<T>&); // constexpr in C++14
+template<class T> bool operator==(const complex<T>&, const complex<T>&); // constexpr in C++14
+template<class T> bool operator==(const complex<T>&, const T&); // constexpr in C++14
+template<class T> bool operator==(const T&, const complex<T>&); // constexpr in C++14, removed in C++20
+template<class T> bool operator!=(const complex<T>&, const complex<T>&); // constexpr in C++14, removed in C++20
+template<class T> bool operator!=(const complex<T>&, const T&); // constexpr in C++14, removed in C++20
+template<class T> bool operator!=(const T&, const complex<T>&); // constexpr in C++14, removed in C++20
template<class T, class charT, class traits>
basic_istream<charT, traits>&
@@ -236,7 +236,6 @@ template<class T> complex<T> tanh (const complex<T>&);
#include <cmath>
#include <iosfwd>
#include <stdexcept>
-#include <type_traits>
#include <version>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
@@ -828,6 +827,8 @@ operator==(const complex<_Tp>& __x, const _Tp& __y)
return __x.real() == __y && __x.imag() == 0;
}
+#if _LIBCPP_STD_VER <= 17
+
template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
@@ -860,6 +861,8 @@ operator!=(const _Tp& __x, const complex<_Tp>& __y)
return !(__x == __y);
}
+#endif
+
// 26.3.7 values:
template <class _Tp, bool = is_integral<_Tp>::value,
@@ -1522,7 +1525,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
}
#endif // !_LIBCPP_HAS_NO_LOCALIZATION
-#if _LIBCPP_STD_VER > 11
+#if _LIBCPP_STD_VER >= 14
// Literal suffix for complex number literals [complex.literals]
inline namespace literals
{
@@ -1565,4 +1568,8 @@ inline namespace literals
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <type_traits>
+#endif
+
#endif // _LIBCPP_COMPLEX