Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:53:04

0001 /*!
0002 @file
0003 Forward declares `boost::hana::not_`.
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_NOT_HPP
0011 #define BOOST_HANA_FWD_NOT_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015 
0016 
0017 namespace boost { namespace hana {
0018     //! Negates a `Logical`.
0019     //! @ingroup group-Logical
0020     //!
0021     //! This method returns a `Logical` with the same tag, but whose
0022     //! truth-value is negated. Specifically, `not_(x)` returns a false-valued
0023     //! `Logical` if `x` is a true-valued `Logical`, and a true-valued one
0024     //! otherwise.
0025     //!
0026     //!
0027     //! Example
0028     //! -------
0029     //! @include example/not.cpp
0030 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0031     constexpr auto not_ = [](auto&& x) -> decltype(auto) {
0032         return tag-dispatched;
0033     };
0034 #else
0035     template <typename L, typename = void>
0036     struct not_impl : not_impl<L, when<true>> { };
0037 
0038     struct not_t {
0039         template <typename X>
0040         constexpr decltype(auto) operator()(X&& x) const;
0041     };
0042 
0043     BOOST_HANA_INLINE_VARIABLE constexpr not_t not_{};
0044 #endif
0045 }} // end namespace boost::hana
0046 
0047 #endif // !BOOST_HANA_FWD_NOT_HPP