9#ifndef BOOST_CLBL_TRTS_SFINAE_ERRORS_HPP
10#define BOOST_CLBL_TRTS_SFINAE_ERRORS_HPP
14namespace boost {
namespace callable_traits {
namespace detail {
20 static constexpr bool value =
true;
24 template<
bool B,
typename T>
26 static_assert(std::is_base_of<sfinae_error, T>::value,
27 "incorrect usage of fail_if");
29 static constexpr bool value = B;
32 template<
typename T,
typename... FailIfs>
36 template<
typename FailMsg,
typename ForceTwoPhaseLookup>
38 using type =
typename std::conditional<std::is_same<ForceTwoPhaseLookup, std::false_type>::value,
39 FailMsg, FailMsg>::type::_::type;
44#define BOOST_CLBL_TRTS_PP_CAT_(x, y) x ## y
45#define BOOST_CLBL_TRTS_PP_CAT(x, y) BOOST_CLBL_TRTS_PP_CAT_(x, y)
47#define BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(origin) \
49 template<typename ErrorMessage> \
51 ::boost::callable_traits::detail::sfinae_error \
56#define BOOST_CLBL_TRTS_SFINAE_MSG(origin, name) \
57struct BOOST_CLBL_TRTS_PP_CAT(name, _ ){}; \
58struct name : error::origin< \
59 BOOST_CLBL_TRTS_PP_CAT(name, _ )>{}; \
62namespace boost {
namespace callable_traits {
#define BOOST_CLBL_TRTS_DISJUNCTION(...)
typename BOOST_CLBL_TRTS_DISJUNCTION(FailIfs..., success< T >)::_::type sfinae_try
#define BOOST_CLBL_TRTS_SFINAE_MSG(origin, name)
#define BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(origin)
static constexpr bool value
typename std::conditional< std::is_same< ForceTwoPhaseLookup, std::false_type >::value, FailMsg, FailMsg >::type::_::type type
static constexpr bool value