3 Forward declares `boost::hana::not_equal`.
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_EQUAL_HPP
11 #define BOOST_HANA_FWD_NOT_EQUAL_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
15 #include <boost/hana/detail/nested_to_fwd.hpp>
18 BOOST_HANA_NAMESPACE_BEGIN
19 //! Returns a `Logical` representing whether `x` is not equal to `y`.
20 //! @ingroup group-Comparable
22 //! The `not_equal` function can be called in two different ways. First,
23 //! it can be called like a normal function:
28 //! However, it may also be partially applied to an argument by using
31 //! not_equal.to(x)(y) == not_equal(x, y)
34 //! In other words, `not_equal.to(x)` is a function object that is
35 //! equivalent to `partial(not_equal, x)`. This is provided to enhance
36 //! the readability of some constructs, especially when using higher
42 //! Given a Logical `Bool` and two Comparables `A` and `B` that
43 //! share a common embedding, the signature is
44 //! @f$ \mathtt{not\_equal} : A \times B \to Bool @f$.
47 //! Two objects to compare for inequality.
52 //! @include example/not_equal.cpp
53 #ifdef BOOST_HANA_DOXYGEN_INVOKED
54 constexpr auto not_equal = [](auto&& x, auto&& y) {
55 return tag-dispatched;
58 template <typename T, typename U, typename = void>
59 struct not_equal_impl : not_equal_impl<T, U, when<true>> { };
61 struct not_equal_t : detail::nested_to<not_equal_t> {
62 template <typename X, typename Y>
63 constexpr auto operator()(X&& x, Y&& y) const;
66 constexpr not_equal_t not_equal{};
68 BOOST_HANA_NAMESPACE_END
70 #endif // !BOOST_HANA_FWD_NOT_EQUAL_HPP