| Issue |
172979
|
| Summary |
[libc++] Some compound assignment operators for bitmask types are not `constexpr` functions
|
| Labels |
libc++
|
| Assignees |
|
| Reporter |
frederick-vs-ja
|
It's quite weird that some bitwise binary operators for bitmask types are `constexpr`, but the corresponding compound assignment operators are not.
For example:
https://github.com/llvm/llvm-project/blob/ad66b67fc596a98c94c392523dfad923444156a1/libcxx/include/__filesystem/copy_options.h#L37-L47
https://github.com/llvm/llvm-project/blob/ad66b67fc596a98c94c392523dfad923444156a1/libcxx/include/__filesystem/copy_options.h#L53-L63
I think these compound assignment operators should be marked either `_LIBCPP_CONSTEXPR_SINCE_CXX20` or `constexpr` (if only available in C++14 and later).
I submitted [LWG3977](https://cplusplus.github.io/LWG/issue3977) for this. But I believe we can add `constexpr` and `noexcept` even without that LWG issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs