commit | ffe2e141834d80e12a41251a5dfe4ad9581a1baa | [log] [tgz] |
---|---|---|
author | eladalon <eladalon@webrtc.org> | Thu Aug 31 04:36:05 2017 -0700 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Aug 31 11:36:05 2017 +0000 |
tree | 11f1aa4b74beca3f97ec3b4ee98a33c3f1dc41a8 | |
parent | 6e09d875fb28e49029fac798382e2c8df4a1f752 [diff] |
Allow PostTask() to take unique_ptr to classes derived of QueuedTask Problem fixed by this CL: Let DerivedQueuedTask be a custom derivation of QueuedTask. Calling PostTask() with a std::unique_ptr<DerivedQueuedTask> does not work, because overload resolution sees PostTask(const Closure& closure) as a better match. The workaround of explicitly converting to std::unique_ptr<QueuedTask> before calling PostTask() results in less readable code. Solution: Use std::enable_if to limit the template, thereby making the compiler use the right version of PostTask(). BUG=webrtc:8188 Review-Url: https://codereview.webrtc.org/3006933002 Cr-Commit-Position: refs/heads/master@{#19625}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.