| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 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 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // functor(); | 57 // functor(); |
| 58 // } | 58 // } |
| 59 // | 59 // |
| 60 | 60 |
| 61 #ifndef WEBRTC_RTC_BASE_BIND_H_ | 61 #ifndef WEBRTC_RTC_BASE_BIND_H_ |
| 62 #define WEBRTC_RTC_BASE_BIND_H_ | 62 #define WEBRTC_RTC_BASE_BIND_H_ |
| 63 | 63 |
| 64 #include <tuple> | 64 #include <tuple> |
| 65 #include <type_traits> | 65 #include <type_traits> |
| 66 | 66 |
| 67 #include "webrtc/base/scoped_ref_ptr.h" | 67 #include "webrtc/rtc_base/scoped_ref_ptr.h" |
| 68 #include "webrtc/base/template_util.h" | 68 #include "webrtc/rtc_base/template_util.h" |
| 69 | 69 |
| 70 #define NONAME | 70 #define NONAME |
| 71 | 71 |
| 72 namespace rtc { | 72 namespace rtc { |
| 73 namespace detail { | 73 namespace detail { |
| 74 // This is needed because the template parameters in Bind can't be resolved | 74 // This is needed because the template parameters in Bind can't be resolved |
| 75 // if they're used both as parameters of the function pointer type and as | 75 // if they're used both as parameters of the function pointer type and as |
| 76 // parameters to Bind itself: the function pointer parameters are exact | 76 // parameters to Bind itself: the function pointer parameters are exact |
| 77 // matches to the function prototype, but the parameters to bind have | 77 // matches to the function prototype, but the parameters to bind have |
| 78 // references stripped. This trick allows the compiler to dictate the Bind | 78 // references stripped. This trick allows the compiler to dictate the Bind |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 return Functor<FP_T(NONAME), R, Args...>(function, args...); | 275 return Functor<FP_T(NONAME), R, Args...>(function, args...); |
| 276 } | 276 } |
| 277 | 277 |
| 278 #undef FP_T | 278 #undef FP_T |
| 279 | 279 |
| 280 } // namespace rtc | 280 } // namespace rtc |
| 281 | 281 |
| 282 #undef NONAME | 282 #undef NONAME |
| 283 | 283 |
| 284 #endif // WEBRTC_RTC_BASE_BIND_H_ | 284 #endif // WEBRTC_RTC_BASE_BIND_H_ |
| OLD | NEW |