add 'which' method for compatibility with boost::variant
This commit is contained in:
parent
da1bc2463d
commit
a3b7328936
1 changed files with 4 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue