Boost logo

Boost :

From: Matthew Wilson (dmd_at_[hidden])
Date: 2002-12-31 03:01:55


As well as various versions of Visual C++ being snippy, there are occasional
scenarios where Borland (5.5 & 5.6) choke on it as well (though these have
been discovered in non-boost-based code, so you may not wish to see)

Matthew

"John Maddock" <jm_at_[hidden]> wrote in message
news:004f01c2af2b$9c6deee0$716787d9_at_1016031671...
> > I have two questions about the use of the typename-keyword when using
> > template-parameter dependent types.
> >
> > 1. Consider the following code:
> >
> > template< class T >
> > {
> > typedef typename A::foo t;
> > };
> >
> > IIRC there are some compilers that only compile the above without the
> > typename keyword? Is that correct (I only have the Intel and GCC
compilers
> > at hand, so I can't check)
>
> Boost code always uses the typename: there are no current compilers that
> don't support it IMO.
>
> > 2. Can the BOOST_STATIC_CONSTANT macro deal with the following?
> >
> > template< class T >
> > {
> > BOOST_STATIC_CONSTANT( typename T::foo, bar = T::value );
> > };
> >
> > i.e. the extra typename keyword?
>
> Um I hope so, but why not typedef the typename first which removes the
> problem?
>
> John Maddock
> http://ourworld.compuserve.com/homepages/john_maddock/index.htm
>
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


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