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

Side by Side Diff: webrtc/rtc_base/function_view.h

Issue 2966523003: Reland "Update includes for webrtc/{base => rtc_base} rename (3/3)" (Closed)
Patch Set: Restoring prime suspect includes Created 3 years, 5 months 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 | « webrtc/rtc_base/flags.cc ('k') | webrtc/rtc_base/function_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_RTC_BASE_FUNCTION_VIEW_H_ 11 #ifndef WEBRTC_RTC_BASE_FUNCTION_VIEW_H_
12 #define WEBRTC_RTC_BASE_FUNCTION_VIEW_H_ 12 #define WEBRTC_RTC_BASE_FUNCTION_VIEW_H_
13 13
14 #include <type_traits> 14 #include <type_traits>
15 #include <utility> 15 #include <utility>
16 16
17 #include "webrtc/base/checks.h" 17 #include "webrtc/rtc_base/checks.h"
18 18
19 // Just like std::function, FunctionView will wrap any callable and hide its 19 // Just like std::function, FunctionView will wrap any callable and hide its
20 // actual type, exposing only its signature. But unlike std::function, 20 // actual type, exposing only its signature. But unlike std::function,
21 // FunctionView doesn't own its callable---it just points to it. Thus, it's a 21 // FunctionView doesn't own its callable---it just points to it. Thus, it's a
22 // good choice mainly as a function argument when the callable argument will 22 // good choice mainly as a function argument when the callable argument will
23 // not be called again once the function has returned. 23 // not be called again once the function has returned.
24 // 24 //
25 // Its constructors are implicit, so that callers won't have to convert lambdas 25 // Its constructors are implicit, so that callers won't have to convert lambdas
26 // and other callables to FunctionView<Blah(Blah, Blah)> explicitly. This is 26 // and other callables to FunctionView<Blah(Blah, Blah)> explicitly. This is
27 // safe because FunctionView is only a reference to the real callable. 27 // safe because FunctionView is only a reference to the real callable.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 // Pointer to a dispatch function that knows the type of the callable thing 122 // Pointer to a dispatch function that knows the type of the callable thing
123 // that's stored in f_, and how to call it. A FunctionView object is empty 123 // that's stored in f_, and how to call it. A FunctionView object is empty
124 // (null) iff call_ is null. 124 // (null) iff call_ is null.
125 RetT (*call_)(VoidUnion, ArgT...); 125 RetT (*call_)(VoidUnion, ArgT...);
126 }; 126 };
127 127
128 } // namespace rtc 128 } // namespace rtc
129 129
130 #endif // WEBRTC_RTC_BASE_FUNCTION_VIEW_H_ 130 #endif // WEBRTC_RTC_BASE_FUNCTION_VIEW_H_
OLDNEW
« no previous file with comments | « webrtc/rtc_base/flags.cc ('k') | webrtc/rtc_base/function_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698