#ifndef SG_NASAL_TRAITS_HXX_
#define SG_NASAL_TRAITS_HXX_
+#include <boost/mpl/logical.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/utility/enable_if.hpp>
}
template<class U>
static
- typename boost::enable_if_c<
- boost::is_same<U, strong_ref>::value
- || (boost::is_same<U, weak_ref>::value && supports_weak_ref<U>::value),
+ typename boost::enable_if<
+ boost::mpl::or_<
+ boost::is_same<U, strong_ref>,
+ boost::mpl::and_<
+ boost::is_same<U, weak_ref>,
+ supports_weak_ref<U>
+ >
+ >,
U
>::type
get(storage_type* ptr)
}
template<class U>
static
- typename boost::enable_if_c<
- boost::is_same<U, weak_ref>::value
- && !supports_weak_ref<U>::value,
+ typename boost::enable_if<
+ boost::mpl::and_<
+ boost::is_same<U, weak_ref>,
+ boost::mpl::not_<supports_weak_ref<U> >
+ >,
U
>::type
get(storage_type* ptr)
}
template<class U>
static
- typename boost::enable_if_c<
- boost::is_same<U, strong_ref>::value
- || (boost::is_same<U, weak_ref>::value && supports_weak_ref<U>::value),
+ typename boost::enable_if<
+ boost::mpl::or_<
+ boost::is_same<U, strong_ref>,
+ boost::mpl::and_<
+ boost::is_same<U, weak_ref>,
+ supports_weak_ref<U>
+ >
+ >,
U
>::type
get(storage_type* ptr)
}
template<class U>
static
- typename boost::enable_if_c<
- boost::is_same<U, weak_ref>::value
- && !supports_weak_ref<U>::value,
+ typename boost::enable_if<
+ boost::mpl::and_<
+ boost::is_same<U, weak_ref>,
+ boost::mpl::not_<supports_weak_ref<U> >
+ >,
U
>::type
get(storage_type* ptr)