commit | d040480f69cc6fe65dd101c493d0561a0cdbaa4a | [log] [tgz] |
---|---|---|
author | kwiberg <kwiberg@webrtc.org> | Mon May 09 13:06:05 2016 |
committer | Commit bot <commit-bot@chromium.org> | Mon May 09 13:06:10 2016 |
tree | a92fad36ebfb042f5f1a66373c1f8e7582b10dd9 | |
parent | e30c27205148b34ba421184efe65f6a0780b436d [diff] |
rtc::Optional<T>: Don't secretly contain a default-constructed T when empty Instead, use a neat trick with union to ensure that we have a T only when we're supposed to (and just a bunch of unused memory otherwise). This is how std::optional behaves, so it makes sense for us to do the same (and it's convenient, too, since we don't have to pay for the default-constructed T, and we support types that don't have default constructors). Doing this became possible recently when we dropped support for MSVC 2013, which didn't support unions containing non-trivial types. Review-Url: https://codereview.webrtc.org/1896833004 Cr-Commit-Position: refs/heads/master@{#12664}
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. This page is maintained by the Google Chrome team.
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.