#ifndef MAPBOX_UTIL_VARIANT_VISITOR_HPP #define MAPBOX_UTIL_VARIANT_VISITOR_HPP namespace mapbox { namespace util { template struct visitor; template struct visitor : Fn { using type = Fn; using Fn::operator(); visitor(Fn fn) : Fn(fn) {} }; template struct visitor : Fn, visitor { using type = visitor; using Fn::operator(); using visitor::operator(); visitor(Fn fn, Fns... fns) : Fn(fn), visitor(fns...) {} }; template visitor make_visitor(Fns... fns) { return visitor(fns...); } } // namespace util } // namespace mapbox #endif // MAPBOX_UTIL_VARIANT_VISITOR_HPP