[libcxx-commits] [libcxx] [libc++] Implement LWG4072: std::optional comparisons: constrain harder (PR #209968)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 12 00:39:12 PDT 2026
frederick-vs-ja wrote:
Hmm, LWG4072 looks like a workaround for some compiler bug or a defect in the C++ core language.
I attempted to remove the resolution of LWG4072 in [libstdc++'s `<optional>`](https://github.com/gcc-mirror/gcc/blob/67c9a2c1c7ed4414151acef4a8e336c751959225/libstdc%2B%2B-v3/include/std/optional) and found that the [corresponding test file](https://github.com/gcc-mirror/gcc/blob/67c9a2c1c7ed4414151acef4a8e336c751959225/libstdc%2B%2B-v3/testsuite/20_util/optional/relops/constrained.cc) still passed with GCC. The test currently fails with Clang, but the resolution of LWG4072 doesn't affect the failures. [Godbolt link](https://godbolt.org/z/Pf5vE6Ex4).
https://github.com/llvm/llvm-project/pull/209968
More information about the libcxx-commits
mailing list