This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [Patch] Second half of tr1/complex


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]