
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? Regards, Alexey.

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'.
participants (2)
-
Alexey Nikitin
-
Peter Dimov