Red Hat at ISO C++ Standards Meeting 2014 (developerblog.redhat.com) 47 points by origamimissile 12y ago ↗ HN
[–] yoklov 12y ago ↗ Some of these new sources of undefined behavior are quite concerning.Converting an enum to a value outside it's range is extremely common, as enums are frequently used as bitmasks and the like.The bit about optional will likely break a fair amount of code which performs functions similar to optional as well. [–] cokernel_hacker 12y ago ↗ It's not quite that bad. Instead, it's the number of bits used by the enumerators. This makes bitwise operations safe on enumerators because or'ing and the like will not result in using more bits than any enumerator.
[–] cokernel_hacker 12y ago ↗ It's not quite that bad. Instead, it's the number of bits used by the enumerators. This makes bitwise operations safe on enumerators because or'ing and the like will not result in using more bits than any enumerator.
2 comments
[ 4.3 ms ] story [ 23.6 ms ] threadConverting an enum to a value outside it's range is extremely common, as enums are frequently used as bitmasks and the like.
The bit about optional will likely break a fair amount of code which performs functions similar to optional as well.