Commit c9fd6f7c authored by Philip Trettner's avatar Philip Trettner

made pair slightly more useful

parent f1ad5636
......@@ -54,9 +54,26 @@ struct pair
{
A first;
B second;
template <class C, class D>
constexpr bool operator==(pair<C, D> const& rhs) const noexcept
{
return first == rhs.first && second == rhs.second;
}
template <class C, class D>
constexpr bool operator!=(pair<C, D> const& rhs) const noexcept
{
return first != rhs.first || second != rhs.second;
}
};
template <class A, class B>
pair(A const&, B const&)->pair<A, B>;
template <class I, class A, class B>
constexpr void introspect(I&& i, pair<A, B>& p)
{
i(p.first, "first");
i(p.second, "second");
}
template <class A, class B, class C>
struct triple
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment