|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-08-18 01:10:09
"Alex Chovanec" <achovane_at_[hidden]> wrote in message news:cfukc4$6l4$1_at_sea.gmane.org...
| Hi,
|
| The following code does not compile under vc7.0-stlport-4.6.2:
|
| struct foo {};
|
| typedef std::vector<int> vector_int;
| typedef std::vector<foo> vector_foo;
|
| BOOST_STATIC_ASSERT((
| boost::is_same<
| int,
| boost::iterator_value<vector_int::iterator>::type>::
| value));
|
| BOOST_STATIC_ASSERT((
| boost::is_same<
| foo,
| boost::iterator_value<vector_foo::iterator>::type>::
| value));
|
| Obviously, neither of these assertions should fail, but the second one does.
| I'm guessing that this is a problem with boost::iterator_value.
well, the problem is with vc7.
|Does anyone
| know how to fix this?
look at the documentation at http://www.boost.org/libs/iterator/doc/iterator_traits.html and apply
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION( foo );
br
Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk