/*============================================================================= Copyright (c) 2015 Kohei Takahashi Use modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). ==============================================================================*/ #ifndef FUSION_TEST_SFINAE_FRIENDLY_HPP #define FUSION_TEST_SFINAE_FRIENDLY_HPP #include #include #include #include #include #if !defined(BOOST_NO_SFINAE) && defined(BOOST_RESULT_OF_USE_DECLTYPE) #include namespace sfinae_friendly { template struct arg_; template struct arg_ { typedef T type; }; template struct check : boost::mpl::true_ { }; template struct check::type> : boost::mpl::false_ { }; struct unspecified {}; typedef boost::fusion::vector<> v0; typedef boost::fusion::vector v1; typedef boost::fusion::vector v2; typedef boost::fusion::vector v3; } #define SFINAE_FRIENDLY_ASSERT(Traits) \ BOOST_MPL_ASSERT((::sfinae_friendly::check::type>)) #else #define SFINAE_FRIENDLY_ASSERT(Traits) \ BOOST_MPL_ASSERT((boost::mpl::true_)) #endif #endif // FUSION_TEST_SFINAE_FRIENDLY_HPP