mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
fix metafunctions for MPL
[SVN r17621]
This commit is contained in:
parent
80df1d8f12
commit
37a6537a5b
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
# include <boost/config.hpp>
|
# include <boost/config.hpp>
|
||||||
# include <boost/utility/addressof.hpp>
|
# include <boost/utility/addressof.hpp>
|
||||||
|
# include <boost/mpl/bool_c.hpp>
|
||||||
|
|
||||||
//
|
//
|
||||||
// ref.hpp - ref/cref, useful helper functions
|
// ref.hpp - ref/cref, useful helper functions
|
||||||
@ -73,16 +74,14 @@ template<class T> inline reference_wrapper<T const> BOOST_REF_CONST cref(T const
|
|||||||
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class is_reference_wrapper
|
class is_reference_wrapper
|
||||||
|
: public mpl::false_c
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class is_reference_wrapper<reference_wrapper<T> >
|
class is_reference_wrapper<reference_wrapper<T> >
|
||||||
|
: public mpl::true_c
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@ -146,6 +145,8 @@ class is_reference_wrapper
|
|||||||
bool, value = (
|
bool, value = (
|
||||||
sizeof(detail::is_reference_wrapper_test(type<T>()))
|
sizeof(detail::is_reference_wrapper_test(type<T>()))
|
||||||
== sizeof(detail::yes_reference_wrapper_t)));
|
== sizeof(detail::yes_reference_wrapper_t)));
|
||||||
|
|
||||||
|
typedef ::boost::mpl::bool_c<value> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user