diff --git a/view.hpp b/view.hpp index ae7efe39..a5405c68 100644 --- a/view.hpp +++ b/view.hpp @@ -309,6 +309,42 @@ namespace util { } + //------------------------------------------------------------------------- + template + constexpr bool + operator== (const ContainerT &a, const view &b) + { + return make_view (a) == b; + } + + + //------------------------------------------------------------------------- + template + constexpr bool + operator!= (const ContainerT &b, const view &a) + { + return !(a == b); + } + + + //------------------------------------------------------------------------- + template + constexpr bool + operator== (const view &a, const ContainerT &b) + { + return a == make_view (b); + } + + + //------------------------------------------------------------------------- + template + constexpr bool + operator!= (const view &a, const ContainerT &b) + { + return !(a == b); + } + + //------------------------------------------------------------------------- // equality operations for string-like views against std::strings bool equal (const std::string&, view);