From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-07-29 10:55:33
Thanks to the workaround independently suggested by Daniel and Aleksey, the
test now compiles successfully in both VC7.1 and GCC 3.3. The workaround
actually also took care of the case when typeof is emulated. The
bottomline -- GCC doesn't like typeof to be used in the return type of a
function template, whether this is a native typeof, or emulated one :-)
(after I performed some simplifications of my code, the error I ended up
with is: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11869, which is a
duplicate of another error, which is "SUSPENDED". But, since the native
typeof also doesn't work in the same context, and since the same workaround
works for both, I consider the issue resolved)
Neither compiler reported any ODR violation.
So I invite you to take another look at the simplified registration process.
Another small addition was two macros:
that are intended to be used in templates, when the expression depends on
template parameters. These macros take care of adding or not adding the
"typname" keyword depending on whether typeof is emulated, or the native one
(or Spirit CVS)
Thanks again for helping me with GCC issue.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk