3 Forward declares `boost::hana::negate`.
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_NEGATE_HPP
11 #define BOOST_HANA_FWD_NEGATE_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Return the inverse of an element of a group.
19 //! @ingroup group-Group
24 //! @include example/negate.cpp
25 #ifdef BOOST_HANA_DOXYGEN_INVOKED
26 constexpr auto negate = [](auto&& x) -> decltype(auto) {
27 return tag-dispatched;
30 template <typename G, typename = void>
31 struct negate_impl : negate_impl<G, when<true>> { };
35 constexpr decltype(auto) operator()(X&& x) const;
38 constexpr negate_t negate{};
40 BOOST_HANA_NAMESPACE_END
42 #endif // !BOOST_HANA_FWD_NEGATE_HPP