13 #ifndef __STOUT_VARIANT_HPP__ 14 #define __STOUT_VARIANT_HPP__ 18 #include <boost/variant.hpp> 46 template <
typename T,
typename... Ts>
58 typename =
typename std::enable_if<
59 !std::is_same<Decayed, Variant>::value>
::type,
60 typename =
typename std::enable_if<
61 !std::is_same<Decayed, boost::variant<T, Ts...>>::value>::type>
64 template <
typename... Fs>
69 std::declval<
boost::variant<T, Ts...>&>()))
71 return boost::apply_visitor(
76 template <
typename... Fs>
81 std::declval<boost::variant<T, Ts...>&>()))
83 return boost::apply_visitor(
95 return variant == that.variant;
100 return !(*
this == that);
104 template <
typename U,
typename... Us>
107 boost::variant<T, Ts...> variant;
111 template <
typename T,
typename... Ts>
114 return stream << variant.variant;
117 #endif // __STOUT_VARIANT_HPP__ auto visit(Fs &&...fs) const -> decltype(boost::apply_visitor(overload(std::forward< Fs >(fs)...), std::declval< boost::variant< T, Ts... > & >()))
Definition: variant.hpp:65
auto overload(Fs &&...fs) -> decltype(Overload< Fs... >(std::forward< Fs >(fs)...))
Definition: overload.hpp:80
Definition: interval.hpp:354
Definition: type_utils.hpp:619
bool operator==(const Variant &that) const
Definition: variant.hpp:93
auto visit(Fs &&...fs) -> decltype(boost::apply_visitor(overload(std::forward< Fs >(fs)...), std::declval< boost::variant< T, Ts... > & >()))
Definition: variant.hpp:77
Definition: variant.hpp:47
Variant(U &&u)
Definition: variant.hpp:62
bool operator!=(const Variant &that) const
Definition: variant.hpp:98
friend std::ostream & operator<<(std::ostream &, const Variant< U, Us... > &)
Try< uint32_t > type(const std::string &path)