diff --git a/include/boost/core/ref.hpp b/include/boost/core/ref.hpp index 6c7a8d0..46db5fe 100644 --- a/include/boost/core/ref.hpp +++ b/include/boost/core/ref.hpp @@ -1,17 +1,15 @@ #ifndef BOOST_CORE_REF_HPP #define BOOST_CORE_REF_HPP -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - #include #include #include #include +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + // // ref.hpp - ref/cref, useful helper functions // @@ -61,9 +59,11 @@ template< class Y, class T > struct ref_convertible enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; }; +#if !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) struct ref_empty { }; +#endif } // namespace detail @@ -117,11 +117,18 @@ public: @remark Only enabled when `Y*` is convertible to `T*`. @remark Does not throw. */ +#if !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) + template::value>::type> + reference_wrapper( reference_wrapper r ) BOOST_NOEXCEPT : t_( r.t_ ) + { + } +#else template reference_wrapper( reference_wrapper r, typename enable_if_c::value, boost::detail::ref_empty>::type = boost::detail::ref_empty() ) BOOST_NOEXCEPT : t_( r.t_ ) { } +#endif /** @return The stored reference.