forked from boostorg/core
Rename to enable_if_has_type in concordance with MPL existing traits
This commit is contained in:
@ -304,7 +304,7 @@ depends on the template arguments of the class. Note that
|
|||||||
again, the second argument to `enable_if` is not needed; the
|
again, the second argument to `enable_if` is not needed; the
|
||||||
default (`void`) is the correct value.
|
default (`void`) is the correct value.
|
||||||
|
|
||||||
The `enable_if_type` template is usable this scenario but instead of
|
The `enable_if_has_type` template is usable this scenario but instead of
|
||||||
using a type traits to enable or disable a specialization, it use a
|
using a type traits to enable or disable a specialization, it use a
|
||||||
SFINAE context to check for the existence of a dependent type inside
|
SFINAE context to check for the existence of a dependent type inside
|
||||||
its parameter. For example, the following structure extracts a dependent
|
its parameter. For example, the following structure extracts a dependent
|
||||||
@ -318,7 +318,7 @@ class value_type_from
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class value_type_from<T, typename enable_if_type<typename T::value_type>::type>
|
class value_type_from<T, typename enable_if_has_type<typename T::value_type>::type>
|
||||||
{
|
{
|
||||||
typedef typename T::value_type type;
|
typedef typename T::value_type type;
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
template<typename T, typename R=void>
|
template<typename T, typename R=void>
|
||||||
struct enable_if_type
|
struct enable_if_has_type
|
||||||
{
|
{
|
||||||
typedef R type;
|
typedef R type;
|
||||||
};
|
};
|
||||||
@ -86,7 +86,7 @@ namespace boost {
|
|||||||
struct enable_if_does_not_work_on_this_compiler;
|
struct enable_if_does_not_work_on_this_compiler;
|
||||||
|
|
||||||
template<typename T, typename R=void>
|
template<typename T, typename R=void>
|
||||||
struct enable_if_type : enable_if_does_not_work_on_this_compiler<T>
|
struct enable_if_has_type : enable_if_does_not_work_on_this_compiler<T>
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
template <bool B, class T = detail::enable_if_default_T>
|
template <bool B, class T = detail::enable_if_default_T>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <boost/type_traits/is_arithmetic.hpp>
|
#include <boost/type_traits/is_arithmetic.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
|
|
||||||
using boost::enable_if_type;
|
using boost::enable_if_has_type;
|
||||||
using boost::enable_if_c;
|
using boost::enable_if_c;
|
||||||
using boost::disable_if_c;
|
using boost::disable_if_c;
|
||||||
using boost::enable_if;
|
using boost::enable_if;
|
||||||
@ -55,7 +55,7 @@ class tester3
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class tester3<T, typename enable_if_type<typename T::value_type>::type>
|
class tester3<T, typename enable_if_has_type<typename T::value_type>::type>
|
||||||
{
|
{
|
||||||
typedef typename T::value_type type;
|
typedef typename T::value_type type;
|
||||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||||
|
Reference in New Issue
Block a user