problems specialising a new operator
Dirk Duellmann
Dirk.Duellmann@cern.ch
Sun Feb 28 23:30:00 GMT 1999
I just confirmed that also the (latest?) snapshot egcs-2.93.06 19990208
(gcc2 ss-980929 experimental) shows the same specialisation problem as
releases 1.1 and 1.1.1. (It has much better diagnostics concerning new
operator argument types though :-)
But still the fragment:
typedef unsigned int size_t;
template <class T > class A {
public:
void *operator new(size_t,int, int);
};
void *A<int>::operator new(size_t, int, int);
{ return 0; }
fails to compile with:
spec1.cpp:7: template-id `operator new<>' for `A<int>::operator
new(unsigned int, int, int)' does not match any template declaration
Any ideas for workarounds that would produce a specialized new?
Cheers, Dirk
More information about the Gcc-bugs
mailing list