From 7c3260e96535264bd015c8ccac580195cbebf76a Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Tue, 7 Jul 2015 18:30:18 -0400 Subject: [PATCH] Made static variants compareable based upon type. --- include/fc/static_variant.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/fc/static_variant.hpp b/include/fc/static_variant.hpp index 3db2bdf..8951891 100644 --- a/include/fc/static_variant.hpp +++ b/include/fc/static_variant.hpp @@ -268,6 +268,14 @@ public: v.visit( impl::move_construct(*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 X& get() {