]>
git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Ensure std::variant relops convert to bool [PR115145]
Ensure that the result of comparing the variant alternatives is
converted to bool immediately rather than copied.
libstdc++-v3/ChangeLog:
PR libstdc++/115145
* include/std/variant (operator==, operator!=, operator<)
(operator<=, operator>, operator>=): Add trailing-return-type to
lambda expressions to trigger conversion to bool.
* testsuite/20_util/variant/relops/115145.cc: New test.