|
|
|||
Warning, file /include/boost/hana/fwd/core/default.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*! 0002 @file 0003 Forward declares `boost::hana::default_` and `boost::hana::is_default`. 0004 0005 Copyright Louis Dionne 2013-2022 0006 Distributed under the Boost Software License, Version 1.0. 0007 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) 0008 */ 0009 0010 #ifndef BOOST_HANA_FWD_CORE_DEFAULT_HPP 0011 #define BOOST_HANA_FWD_CORE_DEFAULT_HPP 0012 0013 #include <boost/hana/config.hpp> 0014 0015 0016 namespace boost { namespace hana { 0017 //! @ingroup group-core 0018 //! Mark a tag-dispatched method implementation as a default implementation. 0019 //! 0020 //! When defining a new concept with tag-dispatched methods, it is 0021 //! sometimes possible to provide a default implementation for some 0022 //! method(s). Making `default_` a base class of such a default 0023 //! implementation makes it possible to detect whether the method 0024 //! was dispatched to the default implementation afterwards. 0025 //! 0026 //! 0027 //! Example 0028 //! ------- 0029 //! @include example/core/default.cpp 0030 struct default_ { }; 0031 0032 //! @ingroup group-core 0033 //! Returns whether a tag-dispatched method implementation is a default 0034 //! implementation. 0035 //! 0036 //! Given a tag-dispatched method implementation `method_impl<T...>`, 0037 //! `is_default<method_impl<T...>>` returns whether `method_impl<T...>` 0038 //! is a default implementation. Note that if there is no default 0039 //! implementation for the method, then `is_default` should not be 0040 //! used unless a static assertion saying that "the method is not 0041 //! implemented" is acceptable. 0042 //! 0043 //! 0044 //! Example 0045 //! ------- 0046 //! @include example/core/default.cpp 0047 #ifdef BOOST_HANA_DOXYGEN_INVOKED 0048 template <typename Method> 0049 struct is_default { see documentation }; 0050 #else 0051 template <typename T, typename = void> 0052 struct is_default; 0053 #endif 0054 }} // end namespace boost::hana 0055 0056 #endif // !BOOST_HANA_FWD_CORE_DEFAULT_HPP
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|