Re-sync with internal repository
[hiphop-php.git] / third-party / thrift / src / thrift / compiler / test / fixtures / inject_metadata_fields / gen-cpp2 / module_for_each_field.h
blobde40a1dc519f2090ce43406a1f9a326beb6bdcb8
1 /**
2 * Autogenerated by Thrift for src/module.thrift
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated @nocommit
6 */
7 #pragma once
9 #include "thrift/compiler/test/fixtures/inject_metadata_fields/gen-cpp2/module_metadata.h"
10 #include <thrift/lib/cpp2/visitation/for_each.h>
12 namespace apache {
13 namespace thrift {
14 namespace detail {
16 template <>
17 struct ForEachField<::cpp2::Fields> {
18 template <typename F, typename... T>
19 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
20 f(0, static_cast<T&&>(t).injected_field_ref()...);
24 template <>
25 struct ForEachField<::cpp2::FieldsInjectedToEmptyStruct> {
26 template <typename F, typename... T>
27 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
28 f(0, static_cast<T&&>(t).injected_field_ref()...);
32 template <>
33 struct ForEachField<::cpp2::FieldsInjectedToStruct> {
34 template <typename F, typename... T>
35 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
36 f(0, static_cast<T&&>(t).string_field_ref()...);
37 f(1, static_cast<T&&>(t).injected_field_ref()...);
41 template <>
42 struct ForEachField<::cpp2::FieldsInjectedWithIncludedStruct> {
43 template <typename F, typename... T>
44 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
45 f(0, static_cast<T&&>(t).string_field_ref()...);
46 f(1, static_cast<T&&>(t).injected_field_ref()...);
47 f(2, static_cast<T&&>(t).injected_structured_annotation_field_ref()...);
48 f(3, static_cast<T&&>(t).injected_unstructured_annotation_field_ref()...);
51 } // namespace detail
52 } // namespace thrift
53 } // namespace apache