types/tagged: add not-equal operator
This commit is contained in:
parent
928e2aa2d5
commit
8111074a44
@ -262,4 +262,18 @@ namespace cruft {
|
||||
) || ...
|
||||
);
|
||||
}
|
||||
|
||||
template <typename ...ComponentsT>
|
||||
bool operator!= (tagged<ComponentsT...> const &lhs, tagged<ComponentsT...> const &rhs)
|
||||
{
|
||||
if (lhs.tag () != rhs.tag ())
|
||||
return false;
|
||||
|
||||
return (
|
||||
(
|
||||
lhs.template is<ComponentsT> () &&
|
||||
(lhs.template get<ComponentsT> () != rhs.template get<ComponentsT> ())
|
||||
) || ...
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user