Made static variants compareable based upon type.
This commit is contained in:
parent
a8b85f6dcc
commit
7c3260e965
1 changed files with 8 additions and 0 deletions
|
|
@ -268,6 +268,14 @@ public:
|
||||||
v.visit( impl::move_construct<static_variant>(*this) );
|
v.visit( impl::move_construct<static_variant>(*this) );
|
||||||
return *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>
|
template<typename X>
|
||||||
X& get() {
|
X& get() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue