1 /*!
2 @file
3 Defines `boost::hana::default_` and `boost::hana::is_default`.
4 
5 @copyright Louis Dionne 2013-2016
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
8  */
9 
10 #ifndef BOOST_HANA_CORE_DEFAULT_HPP
11 #define BOOST_HANA_CORE_DEFAULT_HPP
12 
13 #include <boost/hana/fwd/core/default.hpp>
14 
15 #include <boost/hana/config.hpp>
16 
17 #include <type_traits>
18 
19 
20 BOOST_HANA_NAMESPACE_BEGIN
21     template <typename Method, typename>
22     struct is_default : std::false_type { };
23 
24     template <typename Method>
25     struct is_default<Method, decltype((void)
26         static_cast<default_>(*(Method*)0)
27     )>
28         : std::true_type
29     { };
30 BOOST_HANA_NAMESPACE_END
31 
32 #endif // !BOOST_HANA_CORE_DEFAULT_HPP
33