]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/include/boost/hana/fwd/not.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / hana / include / boost / hana / fwd / not.hpp
CommitLineData
7c673cae
FG
1/*!
2@file
3Forward declares `boost::hana::not_`.
4
5@copyright Louis Dionne 2013-2016
6Distributed under the Boost Software License, Version 1.0.
7(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
8 */
9
10#ifndef BOOST_HANA_FWD_NOT_HPP
11#define BOOST_HANA_FWD_NOT_HPP
12
13#include <boost/hana/config.hpp>
14#include <boost/hana/core/when.hpp>
15
16
17BOOST_HANA_NAMESPACE_BEGIN
18 //! Negates a `Logical`.
19 //! @ingroup group-Logical
20 //!
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
24 //! otherwise.
25 //!
26 //!
27 //! Example
28 //! -------
29 //! @include example/not.cpp
30#ifdef BOOST_HANA_DOXYGEN_INVOKED
31 constexpr auto not_ = [](auto&& x) -> decltype(auto) {
32 return tag-dispatched;
33 };
34#else
35 template <typename L, typename = void>
36 struct not_impl : not_impl<L, when<true>> { };
37
38 struct not_t {
39 template <typename X>
40 constexpr decltype(auto) operator()(X&& x) const;
41 };
42
43 constexpr not_t not_{};
44#endif
45BOOST_HANA_NAMESPACE_END
46
47#endif // !BOOST_HANA_FWD_NOT_HPP