This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Indeed. I would say let's not re-order for now, I'll have a further look later on.
We have a testcase for that issue, see Rev 170083, testsuite/tr1/headers/c++200x/complex.cc.* include/tr1/cmath (float fabs(float), long double fabs(long double)): Wrap in !__CORRECT_ISO_CPP_MATH_H_PROTO1.
There is a comment: // Note: we deal with fabs in a special way, because an using std::fabs // would bring in also the overloads for complex types, which in C++0x // mode have a different return type.
and then it proceeds to using ::fabs and declare the float and long double overloads. Now on solaris, using ::fabs is going to be equivalent to using std::fabs. I don't know if that creates problems for the complex types, and in that case what can be done about it (declare fabs(double) instead of importing the global one?).
namespace std { void f(); } using std::f; namespace std { struct Complex{}; void f(Complex){} } //using std::f; namespace std { using ::f; namespace tr1 { using ::f; void f(std::Complex); } }
-- Marc Glisse
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |