[Boost-bugs] [Boost C++ Libraries] #12052: Boost 1.60 any.hpp error: 'if_' in namespace 'boost::mpl' does not name a template type

Subject: [Boost-bugs] [Boost C++ Libraries] #12052: Boost 1.60 any.hpp error: 'if_' in namespace 'boost::mpl' does not name a template type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-11 16:43:35


#12052: Boost 1.60 any.hpp error: 'if_' in namespace 'boost::mpl' does not name a
template type
-----------------------------------------------+---------------------
 Reporter: Thomas Milotti <thomas.milotti@…> | Owner: nasonov
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: any
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: any.hpp |
-----------------------------------------------+---------------------
 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 <iostream>
 #include <boost/any.hpp>

 int main()
 {
     boost::any a = 1;
     std::cout << boost::any_cast<int>(a) << '\n';
     a = 3.14;
     std::cout << boost::any_cast<double>(a) << '\n';
     a = true;
     std::cout << std::boolalpha << boost::any_cast<bool>(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<ref_type>(*result);

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12052>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC