Lines Matching refs:Tuple
23 #include <tuple>
37 // - data is unpacked into std::tuple<Args...> one by one
38 // - function is called with std::tuple<Args...> containing arguments.
107 // Unpacking into arbitrary tuple.
112 UnpackImpl(const uint8_t *Data, size_t Size, TupleT *Tuple) {
116 // Unpack tuple elements starting from Nth.
119 UnpackImpl(const uint8_t *Data, size_t Size, TupleT *Tuple) {
120 size_t NewSize = UnpackSingle(Data, Size, &std::get<N>(*Tuple));
125 return UnpackImpl<N + 1, TupleT>(Data + (Size - NewSize), NewSize, Tuple);
128 // Unpacks into arbitrary tuple and returns true if successful.
130 bool Unpack(const uint8_t *Data, size_t Size, std::tuple<Args...> *Tuple) {
131 return UnpackImpl<0, std::tuple<Args...>>(Data, Size, Tuple);
150 typedef std::tuple<Args...> ArgsTupleT;
153 // Calling a function with arguments in a tuple.
168 // Unpacking data into arguments tuple of correct type and calling the function.
171 typename FnTraits<Fn>::ArgsTupleT Tuple;
172 if (!Unpack(Data, Size, &Tuple))
175 Apply(F, Tuple);