]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/issues/github_460.cpp
1 // Copyright Jason Rice 2020
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
5 #include <boost/hana/define_struct.hpp>
6 #include <boost/hana/equal.hpp>
7 #include <boost/hana/members.hpp>
8 #include <boost/hana/not_equal.hpp>
9 namespace hana
= boost::hana
;
13 BOOST_HANA_DEFINE_STRUCT(SomeStruct
, (int, x
));
15 constexpr bool operator==(SomeStruct
const& other
) {
16 return hana::equal(hana::members(*this), hana::members(other
));
19 constexpr bool operator!=(SomeStruct
const& other
) {
20 return hana::not_equal(hana::members(*this), hana::members(other
));
25 static_assert(SomeStruct
{5} == SomeStruct
{5}, "");
26 static_assert(hana::equal(SomeStruct
{5}, SomeStruct
{5}), "");