|
|
|||
Warning, file /include/boost/hana/fwd/core/is_a.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::is_a` and `boost::hana::is_an`. 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_IS_A_HPP 0011 #define BOOST_HANA_FWD_CORE_IS_A_HPP 0012 0013 #include <boost/hana/config.hpp> 0014 0015 0016 namespace boost { namespace hana { 0017 //! @ingroup group-core 0018 //! Returns whether the tag of an object matches a given tag. 0019 //! 0020 //! Given a tag `Tag` and a C++ type `T`, `is_a<Tag, T>` is a compile-time 0021 //! Logical representing whether the tag of `T` is exactly `Tag`. In other 0022 //! words, it is equivalent to 0023 //! @code 0024 //! std::is_same<Tag, tag_of<T>::type> 0025 //! @endcode 0026 //! 0027 //! For convenience, an alternate syntax is provided for using `is_a`. 0028 //! Specifically, `is_a<Tag>` is a function object returning whether the 0029 //! argument it is passed has the given tag. In other words, 0030 //! @code 0031 //! is_a<Tag>(x) == is_a<Tag, decltype(x)> 0032 //! @endcode 0033 //! 0034 //! 0035 //! Example 0036 //! ------- 0037 //! @include example/core/is_a.cpp 0038 #ifdef BOOST_HANA_DOXYGEN_INVOKED 0039 template <typename Tag, typename optional_T> 0040 constexpr auto is_a = see-documentation; 0041 #else 0042 template <typename Tag, typename ...T> 0043 struct is_a_t; 0044 0045 template <typename Tag, typename ...T> 0046 BOOST_HANA_INLINE_VARIABLE constexpr is_a_t<Tag, T...> is_a{}; 0047 #endif 0048 0049 //! @ingroup group-core 0050 //! Equivalent to `is_a`; provided for consistency with the rules of the 0051 //! English language. 0052 #ifdef BOOST_HANA_DOXYGEN_INVOKED 0053 template <typename Tag, typename ...T> 0054 constexpr auto is_an = is_a<Tag, T...>; 0055 #else 0056 template <typename Tag, typename ...T> 0057 BOOST_HANA_INLINE_VARIABLE constexpr is_a_t<Tag, T...> is_an{}; 0058 #endif 0059 }} // end namespace boost::hana 0060 0061 #endif // !BOOST_HANA_FWD_CORE_IS_A_HPP
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|