forked from boostorg/typeof
Use enable_if from TypeTraits
This commit is contained in:
@ -12,8 +12,8 @@
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
# include <boost/mpl/int.hpp>
|
||||
# include <boost/type_traits/enable_if.hpp>
|
||||
# include <boost/type_traits/is_function.hpp>
|
||||
# include <boost/utility/enable_if.hpp>
|
||||
|
||||
# include <typeinfo>
|
||||
|
||||
@ -168,12 +168,12 @@ namespace boost
|
||||
{
|
||||
typedef char(*type)[encode_type<T>::value];
|
||||
};
|
||||
template<typename T> typename disable_if<
|
||||
typename is_function<T>::type,
|
||||
template<typename T> typename enable_if_<
|
||||
!is_function<T>::value,
|
||||
typename sizer<T>::type>::type encode_start(T const&);
|
||||
|
||||
template<typename T> typename enable_if<
|
||||
typename is_function<T>::type,
|
||||
template<typename T> typename enable_if_<
|
||||
is_function<T>::value,
|
||||
typename sizer<T>::type>::type encode_start(T&);
|
||||
template<typename Organizer, typename T>
|
||||
msvc_register_type<T,Organizer> typeof_register_type(const T&,Organizer* =0);
|
||||
|
@ -18,8 +18,8 @@ namespace boost { namespace type_of {
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/type_traits/enable_if.hpp>
|
||||
#include <boost/type_traits/is_function.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace type_of {
|
||||
# ifdef BOOST_NO_SFINAE
|
||||
@ -27,11 +27,11 @@ namespace boost { namespace type_of {
|
||||
T& ensure_obj(const T&);
|
||||
# else
|
||||
template<typename T>
|
||||
typename enable_if<is_function<T>, T&>::type
|
||||
typename enable_if_<is_function<T>::value, T&>::type
|
||||
ensure_obj(T&);
|
||||
|
||||
template<typename T>
|
||||
typename disable_if<is_function<T>, T&>::type
|
||||
typename enable_if_<!is_function<T>::value, T&>::type
|
||||
ensure_obj(const T&);
|
||||
# endif
|
||||
}}
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/typeof/encode_decode.hpp>
|
||||
#include <boost/typeof/vector.hpp>
|
||||
#include <boost/type_traits/enable_if.hpp>
|
||||
#include <boost/type_traits/is_function.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#define BOOST_TYPEOF_VECTOR(n) BOOST_PP_CAT(boost::type_of::vector, n)
|
||||
|
||||
@ -39,13 +39,13 @@ namespace boost { namespace type_of {
|
||||
sizer<typename encode_type<V, T>::type> encode(const T&);
|
||||
# else
|
||||
template<class V, class T>
|
||||
typename enable_if<
|
||||
typename is_function<T>::type,
|
||||
typename enable_if_<
|
||||
is_function<T>::value,
|
||||
sizer<typename encode_type<V, T>::type> >::type encode(T&);
|
||||
|
||||
template<class V, class T>
|
||||
typename disable_if<
|
||||
typename is_function<T>::type,
|
||||
typename enable_if_<
|
||||
!is_function<T>::value,
|
||||
sizer<typename encode_type<V, T>::type> >::type encode(const T&);
|
||||
# endif
|
||||
}}
|
||||
|
Reference in New Issue
Block a user