|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-11-30 09:26:03
I have been puzzled by the effect of my mistyping causing this message.
i:\trunk\boost/range/const_iterator.hpp(37) : error C2039: 'const_iterator' : is not a member of 'std::ios_base'
C:\Program Files\Microsoft Visual Studio 8\VC\include\xiosbase(183) : see declaration of 'std::ios_base'
i:\trunk\boost/mpl/eval_if.hpp(63) : see reference to class template instantiation 'boost::range_const_iterator<C>' being
compiled
with
[
C=std::ios_base
]
i:\trunk\boost/range/iterator.hpp(63) : see reference to class template instantiation 'boost::mpl::eval_if_c<C,F1,F2>' being
compiled
with
[
C=true,
F1=boost::range_const_iterator<std::ios_base>,
F2=boost::range_mutable_iterator<const std::ios_base>
]
I:\Boost-sandbox\SOC\2007\visualization\boost/svg_plot/show_2d_settings.hpp(104) : see reference to class template
instantiation 'boost::range_iterator<C>' being compiled
with
[
C=const std::ios_base
]
i:\trunk\boost/range/const_iterator.hpp(37) : error C2146: syntax error : missing ';' before identifier 'type'
i:\trunk\boost/range/const_iterator.hpp(37) : error C4430: missing type specifier - int assumed. Note: C++ does not support
default-int
i:\trunk\boost/range/const_iterator.hpp(37) : error C2208: 'boost::type' : no members defined using this type
i:\trunk\boost/range/const_iterator.hpp(37) : fatal error C1903: unable to recover from previous error(s); stopping compilation
The "erroneous" line 37 is:
template< typename C >
struct range_const_iterator
{
typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
};
And this left me in total disambiguation mode :-)
The cause was simple - I typed ">> end;" when I wanted ">> endl;"
In mitigation I would point out that I got the other 120 endl;'s right ;-)
The compiler, lack an ounce of sense, interpreted this to the letter.
I suspect I may not be first or last person to do this :-)
Could the source file usefully have a comment that says something like
"
If you get a error "'const_iterator' : is not a member of 'std::ios_base'"
here have you typed "end;" somewhere instead of "endl;"
"
?
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden] --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk