Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2005-03-10 13:04:42


Russell Hind wrote:
>
> Hi Eric, I'm trying to get the tests compiling now. I run in to
> problems with things like this (in regress.cpp):
>
> template<typename Range>
> std::vector<int> to_vector_foreach_byval( Range & rng )
> {
> std::vector<int> vect;
> typedef typename ::boost::range_result_iterator<Range>::type iterator;
> typedef typename ::boost::iterator_value<iterator>::type value;
> BOOST_FOREACH( value i, rng )
> {
> vect.push_back(i);
> }
> return vect;
> }
>
> The two typedef lines give these errors:
>
> [C++ Error] main.cpp(110): E2437 'typename' should be followed by a
> qualified, dependent type name
> [C++ Error] main.cpp(111): E2437 'typename' should be followed by a
> qualified, dependent type name
>

Could you try replacing "typename" with "BOOST_DEDUCED_TYPENAME"? (Also,
I think it's a good idea to take this discussion offlist to keep traffic
down until we get the kinks worked out. Feel free to reply to me directly.)

-- 
Eric Niebler
Boost Consulting
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