https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70607
Bug ID: 70607 Summary: The return type of std::conj must be std::complex<T> Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: Alexander.Voigt at desy dot de Target Milestone: --- Host: GNU/Linux x86_64 Target: GNU/Linux x86_64 Created attachment 38229 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38229&action=edit Program which should not compile According to the C++11 standard, all overloads of std::conj() must return a std::complex<T>, with some type T. In libstdc++, however, there seems to exist an overload of std::conj() which returns a scalar floating point type. I've attached an example program, which makes use of this spurious overload. I believe, this example program should not compile. However, it does compile with g++ 4.9.2 on Debian GNU/Linux jessie.