Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-04-27 05:03:10


From: "Alexey Nikitin"
> Next example (only 2 lines) not compiled:
>
> ---- t120.cpp -----
> #include <boost/bind.hpp>
> #include <boost/archive/text_iarchive.hpp>
> --------------------
>
> D:\Alnik\cpp>cl /c /GX t120.cpp
>
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for
80x86
> Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
>
> t120.cpp
> C:\Alnik\heap\boost\boost-dev\boost\mpl\less.hpp(39) : error C2760: syntax
> error : expected ',' not ';'
> C:\Alnik\heap\boost\boost-dev\boost\mpl\less.hpp(51) : see
reference
> to class template instantiation 'boost::mpl::less<T1,T2>' being compiled
> C:\Alnik\heap\boost\boost-dev\boost\mpl\less.hpp(39) : error C2144: syntax
> error : 'const bool' should be preceded by '}'
> C:\Alnik\heap\boost\boost-dev\boost\mpl\less.hpp(39) : error C2062: type
> 'const bool' unexpected
> C:\Alnik\heap\boost\boost-dev\boost\mpl\less.hpp(39) : error C2238:
> unexpected token(s) preceding ';'
> C:\Alnik\heap\boost\boost-dev\boost\mpl\less.hpp(42) : error C2065:
'value'
> : undeclared identifier
>
> But if to rearrange lines then compiled.
> Is this the bug of compiler?

Yes, this is a compiler bug. bind.hpp defines a class template
boost::_bi::value<> which confuses the parser at 'T1::value < T2::value'.


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