commit | 76de5d66f2a37fe505f3d15a946585508ff8f70d | [log] [tgz] |
---|---|---|
author | Pascal Perez <pascallouis@google.com> | Mon Jun 17 21:01:42 2019 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Mon Jun 17 21:01:42 2019 +0000 |
tree | 18bcee1d8df5b2951e1589fd59a2712d1a921599 | |
parent | 718f998c7c363e70427a2aabbeb5bf092e733dd7 [diff] |
[fidl][cpp] Bits are represented with class Far from a fashion statement, representing bits with class rather than an enum makes it possible to have a conversion operator to a numerical type (and hence to bool). This makes it possible to write `if (my_bits_value) { ...`. A downside is that doing an exhaustive match against a bits value in a switch statement is no longer helped by compiler warnings... However, using a bits value in a switch statement and matching against possible bits members is likely an incorrect pattern in the first place. (This revealed a bug fostr's handling of bits values, which will be fixed in a subsequent CL.) FIDL-620 #done FIDL-683 #comment no testing infra, tracked in FIDL-623 FIDL-623 #comment test FIDL-683 Test: added some for new behavior, coverage existed for the rest Change-Id: I922f3e9943d75d44a57dcfc68ee326378fab0ede
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
See Getting Started.
See the documentation.