Boost logo

Boost :

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:

BOOST_TYPEOF_TPL(expr), and
BOOST_AUTO_TPL(var, expr)

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
is used.

http://groups.yahoo.com/group/boost/files/typeof.zip
(or Spirit CVS)

Thanks again for helping me with GCC issue.

Arkadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk