id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc
12052,Boost 1.60 any.hpp error: 'if_' in namespace 'boost::mpl' does not name a template type,Thomas Milotti ,Antony Polukhin,"Linux 3.19.0-51-generic #58-Ubuntu SMP Fri Feb 26 21:22:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 15.04
Boost 1.60
#include
#include
int main()
{
boost::any a = 1;
std::cout << boost::any_cast(a) << '\n';
a = 3.14;
std::cout << boost::any_cast(a) << '\n';
a = true;
std::cout << std::boolalpha << boost::any_cast(a) << '\n';
}
This code generates a compilation error:
/usr/include/boost/any.hpp: In function ‘ValueType boost::any_cast(boost::any&)’:
/usr/include/boost/any.hpp:292:52: error: ‘if_’ in namespace ‘boost::mpl’ does not name a template type
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
^
/usr/include/boost/any.hpp:292:55: error: expected unqualified-id before ‘<’ token
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
^
/usr/include/boost/any.hpp:298:28: error: ‘ref_type’ does not name a type
return static_cast(*result);
",Bugs,closed,To Be Determined,any,Boost 1.60.0,Problem,worksforme,any.hpp,