diff options
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 34fa1ddbc..3104b584e 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)}; } |