From 44af976a44bc194b985fdb880f99a7feff133b5a Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 7 Nov 2013 15:49:37 +0700 Subject: Update libcxx to 194185, 2013-11-07. This brings C++14 support. --- system/include/libcxx/complex | 55 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 7 deletions(-) (limited to 'system/include/libcxx/complex') diff --git a/system/include/libcxx/complex b/system/include/libcxx/complex index dddc58e0..2943da1d 100644 --- a/system/include/libcxx/complex +++ b/system/include/libcxx/complex @@ -255,13 +255,13 @@ template _LIBCPP_BEGIN_NAMESPACE_STD -template class _LIBCPP_TYPE_VIS complex; +template class _LIBCPP_TYPE_VIS_ONLY complex; template complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w); template complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y); template -class _LIBCPP_TYPE_VIS complex +class _LIBCPP_TYPE_VIS_ONLY complex { public: typedef _Tp value_type; @@ -319,11 +319,11 @@ public: } }; -template<> class _LIBCPP_TYPE_VIS complex; -template<> class _LIBCPP_TYPE_VIS complex; +template<> class _LIBCPP_TYPE_VIS_ONLY complex; +template<> class _LIBCPP_TYPE_VIS_ONLY complex; template<> -class _LIBCPP_TYPE_VIS complex +class _LIBCPP_TYPE_VIS_ONLY complex { float __re_; float __im_; @@ -379,7 +379,7 @@ public: }; template<> -class _LIBCPP_TYPE_VIS complex +class _LIBCPP_TYPE_VIS_ONLY complex { double __re_; double __im_; @@ -435,7 +435,7 @@ public: }; template<> -class _LIBCPP_TYPE_VIS complex +class _LIBCPP_TYPE_VIS_ONLY complex { long double __re_; long double __im_; @@ -1521,6 +1521,47 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) return __os << __s.str(); } +#if _LIBCPP_STD_VER > 11 +// Literal suffix for complex number literals [complex.literals] +inline namespace literals +{ + inline namespace complex_literals + { + constexpr complex operator""il(long double __im) + { + return { 0.0l, __im }; + } + + constexpr complex operator""il(unsigned long long __im) + { + return { 0.0l, static_cast(__im) }; + } + + + constexpr complex operator""i(long double __im) + { + return { 0.0, static_cast(__im) }; + } + + constexpr complex operator""i(unsigned long long __im) + { + return { 0.0, static_cast(__im) }; + } + + + constexpr complex operator""if(long double __im) + { + return { 0.0f, static_cast(__im) }; + } + + constexpr complex operator""if(unsigned long long __im) + { + return { 0.0f, static_cast(__im) }; + } + } +} +#endif + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_COMPLEX -- cgit v1.2.3-18-g5258