1 2 // Copyright Oliver Kowalke 2014. 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 7 #ifndef BOOST_CONTEXT_DETAIL_DISABLE_OVERLOAD_H 8 #define BOOST_CONTEXT_DETAIL_DISABLE_OVERLOAD_H 9 10 #include <type_traits> 11 12 #include <boost/config.hpp> 13 14 #include <boost/context/detail/config.hpp> 15 16 #ifdef BOOST_HAS_ABI_HEADERS 17 # include BOOST_ABI_PREFIX 18 #endif 19 20 namespace boost { 21 namespace context { 22 namespace detail { 23 24 // http://ericniebler.com/2013/08/07/universal-references-and-the-copy-constructo/ 25 template< typename X, typename Y > 26 using disable_overload = 27 typename std::enable_if< 28 ! std::is_base_of< 29 X, 30 typename std::decay< Y >::type 31 >::value 32 >::type; 33 34 }}} 35 36 #ifdef BOOST_HAS_ABI_HEADERS 37 #include BOOST_ABI_SUFFIX 38 #endif 39 40 #endif // BOOST_CONTEXT_DETAIL_DISABLE_OVERLOAD_H 41