[Patch] Second half of tr1/complex

Howard Hinnant hhinnant@apple.com
Fri Jan 13 15:07:00 GMT 2006


On Jan 12, 2006, at 7:15 PM, Paolo Carlini wrote:

> the below would be the remaining part of tr1/complex, the additional
> overloads.

I see one more issue that we might want to cover here.  The new  
overloads look overly generic to me, which may break user code.  For  
example, consider:

#include <tr1/complex>

using namespace std::tr1;

struct small {};
struct big
{
     big() {}
     big(small) {}
};

big arg(const big&) {return big();}

int main()
{
    big b = arg(small());
}

So I'd be tempted to restrict these new overloads to integral or  
arithmetic as appropriate.

-Howard



More information about the Libstdc++ mailing list