Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-01-31 20:32:33


Daniel James writes:
> I've been trying out a pre-release of g++ 4.0, and its typeof now
> works a lot better than the older versions. This allows it to be used
> for metaprogramming. As an example, I've attached a compile time
> factorial implemented mainly using operator overloads (it's not
> commented at all, but should be pretty easy to understand for most
> people on this list). I think it would be possible to write a
> metaprogramming library which would have much nicer syntax (borrowing
> techniques from lamba & phoenix), and integrate well with mpl.

You don't need 'typeof' for that kind of syntax sugar; a standard
compliant compiler will suffice, see
http://thread.gmane.org/gmane.comp.lib.boost.devel/77267.

-- 
Aleksey Gurtovoy
MetaCommunications Engineering

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