>From: "Daniel Frey" <[EMAIL PROTECTED]> > On Sun, 22 Jun 2003 22:01:19 +0200, Terje Slettebų wrote: > > > > Another thing, are the ADD_OPERATOR macro in your code necessary? It > > compiles fine without it on Intel C++ 7.1. > > The GCC doesn't work without the operators, as it doesn't implicitly tries > to satisfy float*pi_t by casting pi_t to float to use float*float. I > think this is OK as the language can go for two ways: > > a) define float*float and use a promotion/conversion for, say, float*int. > b) define several operators float*float, float*int, ... > > if it's b), the compiler cannot cast pi_t to float as it doesn't know > whether to select float*float or float*int, thus it fails. Maybe a > question for the language lawyers over at csc++ to find out what's > correct.
It's an odd thing, anyway. Both g++ 3.2 and MSVC 7.1 complains that there's no matching operator*. > >> Also, I'm not sure whether it's standard compliant code. > > > > I think it is. It specialises a member. What could be the problem with > > this? As you say, errors are caught at link time. > > I think that you have to declare the specialization in the class' > definition, not just outside. But I may be wrong here and I haven't > checked it. I don't think so. I tried that, and it gave the error: "error: explicit specialization is not allowed in the current scope" Regards, Terje _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost