3 #include <boost/variant.hpp>
14 return std::is_same<T, TT>::value;
21 template<
typename T,
typename Variant>
27 template<
typename Target>
35 template<
typename Target,
typename... Args>
44 return std::hash<T>()(val);
49 template<
typename... T>
50 inline std::size_t
variant_hash(
const boost::variant<T...>& value) {
55 template<
template<
typename...>
class Check,
typename T,
typename Variant>
57 template<
template<
typename...>
class Check,
typename T,
template<
typename...>
class Variant,
typename... Args>
59 static constexpr
bool value = std::disjunction<Check<T,Args>...>::value;
63 template<
typename T,
typename Variant>
67 template<
typename T,
typename Variant>
carl is the main namespace for the library.
std::size_t variant_hash(const boost::variant< T... > &value)
Target variant_extend(const boost::variant< Args... > &variant)
bool variant_is_type(const Variant &variant) noexcept
Checks whether a variant contains a value of a fiven type.
constexpr bool operator()(const TT &) const noexcept
Target operator()(const T &t) const
std::size_t operator()(const T &val) const
static constexpr bool value
static constexpr bool value