1 /** 2 * Autogenerated by Thrift for src/module.thrift 3 * 4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 * @generated @nocommit 6 */ 7 #pragma once 8 9 #include "thrift/compiler/test/fixtures/any/gen-cpp2/module_metadata.h" 10 #include <thrift/lib/cpp2/visitation/visit_union.h> 11 12 namespace apache { 13 namespace thrift { 14 namespace detail { 15 16 template <> 17 struct VisitUnion<::cpp2::MyUnion> { 18 template <typename F, typename T> 19 void operator()(FOLLY_MAYBE_UNUSED F&& f, T&& t) const { 20 using Union = std::remove_reference_t<T>; 21 switch (t.getType()) { 22 case Union::Type::myString: 23 return f(0, *static_cast<T&&>(t).myString_ref()); 24 case Union::Type::__EMPTY__: ; 25 } 26 } 27 }; 28 } // namespace detail 29 } // namespace thrift 30 } // namespace apache 31