help with iterator_value and BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION

Hi, The boost.iterator docs says On compilers that don't support partial specialization, such as Microsoft Visual C++ 6.0 or 7.0, you may need to manually invoke BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION on the value_type of pointers that are passed to these metafunctions. Can anyone show how this must be used. I have no idea on how to apply this workaround. Thanks Thorsten

"Thorsten Ottosen" <nesotto@cs.auc.dk> writes:
Hi,
The boost.iterator docs says
On compilers that don't support partial specialization, such as Microsoft Visual C++ 6.0 or 7.0, you may need to manually invoke BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION on the value_type of pointers that are passed to these metafunctions. Can anyone show how this must be used. I have no idea on how to apply this workaround.
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? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

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? John.

"John Maddock" <john@johnmaddock.co.uk> wrote in message news:037701c4716d$6cf1dae0$d6390252@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 ); ? Thanks Thorsten

"Thorsten Ottosen" <nesotto@cs.auc.dk> writes:
"John Maddock" <john@johnmaddock.co.uk> wrote in message news:037701c4716d$6cf1dae0$d6390252@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
participants (3)
-
David Abrahams
-
John Maddock
-
Thorsten Ottosen