Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: base/tuple.h

Issue 2526623002: Remove unused include. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Use std::tuple as tuple type. This file contains helper functions for 5 // Use std::tuple as tuple type. This file contains helper functions for
6 // working with std::tuples. 6 // working with std::tuples.
7 // The functions DispatchToMethod and DispatchToFunction take a function pointer 7 // The functions DispatchToMethod and DispatchToFunction take a function pointer
8 // or instance and method pointer, and unpack a tuple into arguments to the 8 // or instance and method pointer, and unpack a tuple into arguments to the
9 // call. 9 // call.
10 // 10 //
(...skipping 10 matching lines...) Expand all
21 // struct { void SomeMeth(int a, int b, int c) { } } foo; 21 // struct { void SomeMeth(int a, int b, int c) { } } foo;
22 // DispatchToMethod(&foo, &Foo::SomeMeth, std::make_tuple(1, 2, 3)); 22 // DispatchToMethod(&foo, &Foo::SomeMeth, std::make_tuple(1, 2, 3));
23 // // foo->SomeMeth(1, 2, 3); 23 // // foo->SomeMeth(1, 2, 3);
24 24
25 #ifndef BASE_TUPLE_H_ 25 #ifndef BASE_TUPLE_H_
26 #define BASE_TUPLE_H_ 26 #define BASE_TUPLE_H_
27 27
28 #include <stddef.h> 28 #include <stddef.h>
29 #include <tuple> 29 #include <tuple>
30 30
31 #include "base/bind_helpers.h"
32 #include "build/build_config.h" 31 #include "build/build_config.h"
33 32
34 namespace base { 33 namespace base {
35 34
36 // Index sequences 35 // Index sequences
37 // 36 //
38 // Minimal clone of the similarly-named C++14 functionality. 37 // Minimal clone of the similarly-named C++14 functionality.
39 38
40 template <size_t...> 39 template <size_t...>
41 struct IndexSequence {}; 40 struct IndexSequence {};
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 InTuple&& in, 190 InTuple&& in,
192 OutTuple* out) { 191 OutTuple* out) {
193 DispatchToMethodImpl(obj, method, std::forward<InTuple>(in), out, 192 DispatchToMethodImpl(obj, method, std::forward<InTuple>(in), out,
194 MakeIndexSequenceForTuple<InTuple>(), 193 MakeIndexSequenceForTuple<InTuple>(),
195 MakeIndexSequenceForTuple<OutTuple>()); 194 MakeIndexSequenceForTuple<OutTuple>());
196 } 195 }
197 196
198 } // namespace base 197 } // namespace base
199 198
200 #endif // BASE_TUPLE_H_ 199 #endif // BASE_TUPLE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698