Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2005-03-10 13:00:22


"Russell Hind" wrote:

> 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
>
> So quite a few of these through the regression .cpp file. Any ideas how
> to solve these so I can run the tests?
>
The :: before namespace name ::boost must be omitted.

BCB doesn't like it.
/Pavel


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