3 Forward declares `boost::hana::not_`.
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_NOT_HPP
11 #define BOOST_HANA_FWD_NOT_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Negates a `Logical`.
19 //! @ingroup group-Logical
21 //! This method returns a `Logical` with the same tag, but whose
22 //! truth-value is negated. Specifically, `not_(x)` returns a false-valued
23 //! `Logical` if `x` is a true-valued `Logical`, and a true-valued one
29 //! @include example/not.cpp
30 #ifdef BOOST_HANA_DOXYGEN_INVOKED
31 constexpr auto not_ = [](auto&& x) -> decltype(auto) {
32 return tag-dispatched;
35 template <typename L, typename = void>
36 struct not_impl : not_impl<L, when<true>> { };
40 constexpr decltype(auto) operator()(X&& x) const;
43 constexpr not_t not_{};
45 BOOST_HANA_NAMESPACE_END
47 #endif // !BOOST_HANA_FWD_NOT_HPP