Skip to content

Commit

Permalink
Added const overload of utils::get_if for the boost path
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jan 20, 2021
1 parent 3b2df07 commit 6c6e099
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/variant.hpp
Expand Up @@ -67,6 +67,12 @@ inline T* get_if(V* variant)
return boost::get<T>(variant);
}

template<typename T, typename V>
inline const T* get_if(const V* variant)
{
return boost::get<T>(variant);
}

#endif

template<typename... Types>
Expand Down

0 comments on commit 6c6e099

Please sign in to comment.