1414#define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
1515
1616#include < boost/detail/reference_content.hpp>
17- #include < boost/mpl/bool.hpp>
18- #include < boost/mpl/if.hpp>
19- #include < boost/mpl/not.hpp>
2017#include < boost/type_traits/is_reference.hpp>
18+ #include < boost/type_traits/integral_constant.hpp>
19+ #include < boost/type_traits/conditional.hpp>
2120
2221namespace boost {
2322
@@ -96,13 +95,13 @@ class optional_base : public optional_tag
9695
9796 typedef T value_type ;
9897
99- typedef mpl::true_ is_reference_tag ;
100- typedef mpl::false_ is_not_reference_tag ;
98+ typedef true_type is_reference_tag ;
99+ typedef false_type is_not_reference_tag ;
101100
102101 typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
103102
104103 public:
105- typedef BOOST_DEDUCED_TYPENAME mpl::if_ <is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
104+ typedef BOOST_DEDUCED_TYPENAME conditional <is_reference_predicate::value ,types_when_ref,types_when_not_ref>::type types ;
106105
107106 protected:
108107 typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ;
@@ -422,7 +421,7 @@ class optional_base : public optional_tag
422421 template <class Expr >
423422 void construct ( Expr&& factory, in_place_factory_base const * )
424423 {
425- BOOST_STATIC_ASSERT ( ::boost::mpl::not_< is_reference_predicate> ::value ) ;
424+ BOOST_STATIC_ASSERT ( ! is_reference_predicate::value ) ;
426425 boost_optional_detail::construct<value_type>(factory, m_storage.address ());
427426 m_initialized = true ;
428427 }
@@ -431,7 +430,7 @@ class optional_base : public optional_tag
431430 template <class Expr >
432431 void construct ( Expr&& factory, typed_in_place_factory_base const * )
433432 {
434- BOOST_STATIC_ASSERT ( ::boost::mpl::not_< is_reference_predicate> ::value ) ;
433+ BOOST_STATIC_ASSERT ( ! is_reference_predicate::value ) ;
435434 factory.apply (m_storage.address ()) ;
436435 m_initialized = true ;
437436 }
@@ -456,7 +455,7 @@ class optional_base : public optional_tag
456455 template <class Expr >
457456 void construct ( Expr const & factory, in_place_factory_base const * )
458457 {
459- BOOST_STATIC_ASSERT ( ::boost::mpl::not_< is_reference_predicate> ::value ) ;
458+ BOOST_STATIC_ASSERT ( ! is_reference_predicate::value ) ;
460459 boost_optional_detail::construct<value_type>(factory, m_storage.address ());
461460 m_initialized = true ;
462461 }
@@ -465,7 +464,7 @@ class optional_base : public optional_tag
465464 template <class Expr >
466465 void construct ( Expr const & factory, typed_in_place_factory_base const * )
467466 {
468- BOOST_STATIC_ASSERT ( ::boost::mpl::not_< is_reference_predicate> ::value ) ;
467+ BOOST_STATIC_ASSERT ( ! is_reference_predicate::value ) ;
469468 factory.apply (m_storage.address ()) ;
470469 m_initialized = true ;
471470 }
0 commit comments