From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-07-28 22:03:42
I modified the code to automatically generate IDs of registration groups.
The registration now is as simple as:
I also added some tests that should cause the ODR violation (see odr.hpp,
odr1.cpp, odr2.cpp). VC7.1 is fine with them, however I can't make GCC 3.3
to compile this, and it stops much before the ODR could be diagnosed. Looks
like this compiler totally can't handle the case when I try to use typeof
(native or not) inside a template.
When I force the typeof emulation, I am getting:
"sorry, unimplemented: `method_call_expr' not supported by dump_expr"
on every attempt to use my encoding/decoding stuff inside a template. From
searching the web it looks like this is some kind of known bug related to
improper handeling of sizeof(). Since sizeof() is the central part of all
this, I don't really know how to work it around...
This would probably be OK, since GCC has the native typeof support.
However, when I use the native support, I run into a different problem that
can be illustrated by the following code:
template<class T, class U>
typeof(T() + U()) sum(const T& t, const U& u)
return t + u;
sum(5, 3.14); // this is line 9
The compile of this code fails with following message:
a.cpp:9: internal compiler error: in write_type, at cp/mangle.c:1555
GCC appears to be fine when the native typeof is used inside _class_
I would really appreciate if anybody shed some light on any of these
The code is in the Spirit CVS and at:
Again, eveything is working fine in VC7.1. If anybody could try any other
compiler (to build main.cpp, odr1.cpp, and odr2.cpp together), I would
really appreciate this.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk