]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/hana/fwd/negate.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / hana / fwd / negate.hpp
CommitLineData
7c673cae
FG
1/*!
2@file
3Forward declares `boost::hana::negate`.
4
b32b8144 5@copyright Louis Dionne 2013-2017
7c673cae
FG
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_NEGATE_HPP
11#define BOOST_HANA_FWD_NEGATE_HPP
12
13#include <boost/hana/config.hpp>
14#include <boost/hana/core/when.hpp>
15
16
1e59de90 17namespace boost { namespace hana {
7c673cae
FG
18 //! Return the inverse of an element of a group.
19 //! @ingroup group-Group
20 //!
21 //!
22 //! Example
23 //! -------
24 //! @include example/negate.cpp
25#ifdef BOOST_HANA_DOXYGEN_INVOKED
26 constexpr auto negate = [](auto&& x) -> decltype(auto) {
27 return tag-dispatched;
28 };
29#else
30 template <typename G, typename = void>
31 struct negate_impl : negate_impl<G, when<true>> { };
32
33 struct negate_t {
34 template <typename X>
35 constexpr decltype(auto) operator()(X&& x) const;
36 };
37
1e59de90 38 BOOST_HANA_INLINE_VARIABLE constexpr negate_t negate{};
7c673cae 39#endif
1e59de90 40}} // end namespace boost::hana
7c673cae
FG
41
42#endif // !BOOST_HANA_FWD_NEGATE_HPP