c++: satisfaction value of type const bool [PR104410]
authorPatrick Palka <ppalka@redhat.com>
Tue, 8 Feb 2022 14:11:29 +0000 (09:11 -0500)
committerPatrick Palka <ppalka@redhat.com>
Tue, 8 Feb 2022 14:11:29 +0000 (09:11 -0500)
commit7ff201d85fad11ba6365a5612124b75b385a97bd
tree434c20375e3f384671cf3b2aae70c61a02b9f556
parentdb5f1c17031ad8a898d77121f1e0e0141306e22a
c++: satisfaction value of type const bool [PR104410]

Here constant evaluation of the atomic constraint use_func_v<T>
sensibly yields an INTEGER_CST of type const bool, but the assert in
satisfaction_value expects unqualified bool.  So let's just relax the
assert to accept cv-qualified bool.

PR c++/104410

gcc/cp/ChangeLog:

* constraint.cc (satisfaction_value): Relax assert to accept
cv-qualified bool.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-pr104410.C: New test.
gcc/cp/constraint.cc
gcc/testsuite/g++.dg/cpp2a/concepts-pr104410.C [new file with mode: 0644]