add 'which' method for compatibility with boost::variant

This commit is contained in:
artemp 2015-02-26 16:23:20 +01:00
parent da1bc2463d
commit a3b7328936

View file

@ -662,6 +662,10 @@ public:
return type_index;
}
VARIANT_INLINE int which() const noexcept
{
return static_cast<int>(sizeof...(Types) - type_index - 1);
}
// visitor
// unary
template <typename F, typename V>