Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-24 10:12:06


"Thorsten Ottosen" <nesotto_at_[hidden]> writes:

> "John Maddock" <john_at_[hidden]> wrote in message news:037701c4716d$6cf1dae0$d6390252_at_fuji...
> |
> | > See the bottom of
> | >
> | > http://www.boost.org/libs/type_traits/index.html#transformations
> | >
> | > It's cross-linked in the Boost iterator docs, in fact. What are we
> | missing?
> |
> | I guess he's not sure what argument to pass to the macro, would an example
> | in the iterator docs help?
>
> yes :-) in particular, given
>
> template< class T >
> struct value_type_of
> {
> typedef typename iterator_value<T>::type type;
> };
>
> do I say
>
> typedef string::iterator I;
> BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION( I );

No, you have to pass I's value_type. There's no way for the compiler
to strip the pointer from I purely at compile-time.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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