3 Forward declares `boost::hana::default_` and `boost::hana::is_default`.
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)
10 #ifndef BOOST_HANA_FWD_CORE_DEFAULT_HPP
11 #define BOOST_HANA_FWD_CORE_DEFAULT_HPP
13 #include <boost/hana/config.hpp>
16 BOOST_HANA_NAMESPACE_BEGIN
17 //! @ingroup group-core
18 //! Mark a tag-dispatched method implementation as a default implementation.
20 //! When defining a new concept with tag-dispatched methods, it is
21 //! sometimes possible to provide a default implementation for some
22 //! method(s). Making `default_` a base class of such a default
23 //! implementation makes it possible to detect whether the method
24 //! was dispatched to the default implementation afterwards.
29 //! @include example/core/default.cpp
32 //! @ingroup group-core
33 //! Returns whether a tag-dispatched method implementation is a default
36 //! Given a tag-dispatched method implementation `method_impl<T...>`,
37 //! `is_default<method_impl<T...>>` returns whether `method_impl<T...>`
38 //! is a default implementation. Note that if there is no default
39 //! implementation for the method, then `is_default` should not be
40 //! used unless a static assertion saying that "the method is not
41 //! implemented" is acceptable.
46 //! @include example/core/default.cpp
47 #ifdef BOOST_HANA_DOXYGEN_INVOKED
48 template <typename Method>
49 struct is_default { see documentation };
51 template <typename T, typename = void>
54 BOOST_HANA_NAMESPACE_END
56 #endif // !BOOST_HANA_FWD_CORE_DEFAULT_HPP