Re-sync with internal repository
[hiphop-php.git] / third-party / thrift / src / thrift / compiler / test / fixtures / lazy_deserialization / gen-cpp2 / simple_for_each_field.h
blob2b4640254fba01efc009f58544ef546cf3ffeeeb
1 /**
2 * Autogenerated by Thrift for src/simple.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/lazy_deserialization/gen-cpp2/simple_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<::apache::thrift::test::Foo> {
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).field1_ref()...);
21 f(1, static_cast<T&&>(t).field2_ref()...);
22 f(2, static_cast<T&&>(t).field3_ref()...);
23 f(3, static_cast<T&&>(t).field4_ref()...);
27 template <>
28 struct ForEachField<::apache::thrift::test::LazyFoo> {
29 template <typename F, typename... T>
30 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
31 f(0, static_cast<T&&>(t).field1_ref()...);
32 f(1, static_cast<T&&>(t).field2_ref()...);
33 f(2, static_cast<T&&>(t).field3_ref()...);
34 f(3, static_cast<T&&>(t).field4_ref()...);
38 template <>
39 struct ForEachField<::apache::thrift::test::OptionalFoo> {
40 template <typename F, typename... T>
41 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
42 f(0, static_cast<T&&>(t).field1_ref()...);
43 f(1, static_cast<T&&>(t).field2_ref()...);
44 f(2, static_cast<T&&>(t).field3_ref()...);
45 f(3, static_cast<T&&>(t).field4_ref()...);
49 template <>
50 struct ForEachField<::apache::thrift::test::OptionalLazyFoo> {
51 template <typename F, typename... T>
52 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
53 f(0, static_cast<T&&>(t).field1_ref()...);
54 f(1, static_cast<T&&>(t).field2_ref()...);
55 f(2, static_cast<T&&>(t).field3_ref()...);
56 f(3, static_cast<T&&>(t).field4_ref()...);
60 template <>
61 struct ForEachField<::apache::thrift::test::LazyCppRef> {
62 template <typename F, typename... T>
63 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
64 f(0, static_cast<T&&>(t).field1_ref()...);
65 f(1, static_cast<T&&>(t).field2_ref()...);
66 f(2, static_cast<T&&>(t).field3_ref()...);
67 f(3, static_cast<T&&>(t).field4_ref()...);
71 template <>
72 struct ForEachField<::apache::thrift::test::IndexedFoo> {
73 template <typename F, typename... T>
74 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
75 f(0, static_cast<T&&>(t).serialized_data_size_ref()...);
76 f(1, static_cast<T&&>(t).field1_ref()...);
77 f(2, static_cast<T&&>(t).field2_ref()...);
78 f(3, static_cast<T&&>(t).field3_ref()...);
79 f(4, static_cast<T&&>(t).field4_ref()...);
80 f(5, static_cast<T&&>(t).field_id_to_size_ref()...);
84 template <>
85 struct ForEachField<::apache::thrift::test::OptionalIndexedFoo> {
86 template <typename F, typename... T>
87 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
88 f(0, static_cast<T&&>(t).serialized_data_size_ref()...);
89 f(1, static_cast<T&&>(t).field1_ref()...);
90 f(2, static_cast<T&&>(t).field2_ref()...);
91 f(3, static_cast<T&&>(t).field3_ref()...);
92 f(4, static_cast<T&&>(t).field4_ref()...);
93 f(5, static_cast<T&&>(t).field_id_to_size_ref()...);
97 template <>
98 struct ForEachField<::apache::thrift::test::Empty> {
99 template <typename F, typename... T>
100 void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const {
103 } // namespace detail
104 } // namespace thrift
105 } // namespace apache