diff options
author | Yiran Wang <yiran@google.com> | 2015-06-23 15:33:17 -0700 |
---|---|---|
committer | Yiran Wang <yiran@google.com> | 2015-06-29 10:56:28 -0700 |
commit | 1d9fec7937f45dde5e04cac966a2d9a12f2fc15a (patch) | |
tree | 3fbcd18a379a05fd6d43491a107e1f36bc61b185 /gcc-4.9/libstdc++-v3/include/std/complex | |
parent | f378ebf14df0952eae870c9865bab8326aa8f137 (diff) | |
download | toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.zip toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.gz toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.bz2 |
Synchronize with google/gcc-4_9 to r224707 (from r214835)
Change-Id: I3d6f06fc613c8f8b6a82143dc44b7338483aac5d
Diffstat (limited to 'gcc-4.9/libstdc++-v3/include/std/complex')
-rw-r--r-- | gcc-4.9/libstdc++-v3/include/std/complex | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc-4.9/libstdc++-v3/include/std/complex b/gcc-4.9/libstdc++-v3/include/std/complex index 34fa1dd..3104b58 100644 --- a/gcc-4.9/libstdc++-v3/include/std/complex +++ b/gcc-4.9/libstdc++-v3/include/std/complex @@ -44,8 +44,14 @@ #include <cmath> #include <sstream> -// Get rid of a macro possibly defined in <complex.h> -#undef complex +// The C++ <complex> header is incompatible with the C99 <complex.h> header, +// they cannot be included into a single translation unit portably. Notably, +// C++11's <ccomplex> does not include C99's <complex.h> and in C++11's +// <complex.h> is defined to provide only what C++11's <ccomplex> does in a +// different namespace. +#ifdef _GLIBCXX_C99_COMPLEX_H +#error Cannot include both <complex> and C99's <complex.h> +#endif namespace std _GLIBCXX_VISIBILITY(default) { @@ -1929,6 +1935,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline namespace literals { inline namespace complex_literals { +#define __cpp_lib_complex_udls 201309 + constexpr std::complex<float> operator""if(long double __num) { return std::complex<float>{0.0F, static_cast<float>(__num)}; } |