25 #ifndef CARGO_IS_VISITABLE_HPP
26 #define CARGO_IS_VISITABLE_HPP
28 #include <type_traits>
36 template <
typename C>
static std::true_type
37 test(decltype(std::declval<C>().
template accept(
Visitor()))*);
39 template <
typename C>
static std::false_type
42 static constexpr
bool value = std::is_same<decltype(test<T>(0)), std::true_type>
::value;
49 struct isVisitable :
public std::integral_constant<bool, isVisitableHelper__<T>::value> {};
53 #endif // CARGO_IS_VISITABLE_HPP
Definition: is-visitable.hpp:33
Definition: is-visitable.hpp:34
static constexpr bool value
Definition: is-visitable.hpp:42
static std::true_type test(decltype(std::declval< C >().template accept(Visitor()))*)
Helper for compile-time checking against existance of template method 'accept'.
Definition: is-visitable.hpp:49