Made static variants compareable based upon type.

This commit is contained in:
Daniel Larimer 2015-07-07 18:30:18 -04:00
parent a8b85f6dcc
commit 7c3260e965

View file

@ -268,6 +268,14 @@ public:
v.visit( impl::move_construct<static_variant>(*this) );
return *this;
}
friend bool operator == ( const static_variant& a, const static_variant& b )
{
return a.wich() == b.which();
}
friend bool operator < ( const static_variant& a, const static_variant& b )
{
return a.wich() < b.which();
}
template<typename X>
X& get() {