c++: Diagnose invalid use of member function in requires
authorPatrick Palka <ppalka@redhat.com>
Wed, 22 Apr 2020 02:18:50 +0000 (22:18 -0400)
committerPatrick Palka <ppalka@redhat.com>
Wed, 22 Apr 2020 02:18:50 +0000 (22:18 -0400)
commit05f14938111e34edd272628a9268444256735e10
treed6968099e75f5c54e0faee13b9f20c80a70b3747
parentc270abe832fe77f34d49c00da20de9b1c6f28ea9
c++: Diagnose invalid use of member function in requires

This updates diagnose_valid_expression to mirror the convert_to_void check added
to tsubst_valid_expression_requirement by r10-7554.

gcc/cp/ChangeLog:

PR c++/67825
* constraint.cc (diagnose_valid_expression): Check convert_to_void here
as well as in tsubst_valid_expression_requirement.

gcc/testsuite/ChangeLog:

PR c++/67825
* g++.dg/concepts/diagnostic10.C: New test.
* g++.dg/cpp2a/concepts-pr67178.C: Adjust dg-message.
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/concepts/diagnostic10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C