Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:13:44

0001 /*!
0002 @file
0003 Forward declares `boost::hana::negate`.
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_NEGATE_HPP
0011 #define BOOST_HANA_FWD_NEGATE_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015 
0016 
0017 namespace boost { namespace hana {
0018     //! Return the inverse of an element of a group.
0019     //! @ingroup group-Group
0020     //!
0021     //!
0022     //! Example
0023     //! -------
0024     //! @include example/negate.cpp
0025 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0026     constexpr auto negate = [](auto&& x) -> decltype(auto) {
0027         return tag-dispatched;
0028     };
0029 #else
0030     template <typename G, typename = void>
0031     struct negate_impl : negate_impl<G, when<true>> { };
0032 
0033     struct negate_t {
0034         template <typename X>
0035         constexpr decltype(auto) operator()(X&& x) const;
0036     };
0037 
0038     BOOST_HANA_INLINE_VARIABLE constexpr negate_t negate{};
0039 #endif
0040 }} // end namespace boost::hana
0041 
0042 #endif // !BOOST_HANA_FWD_NEGATE_HPP