c++: Check constraints before instantiation from mark_used [PR95132]
This makes mark_used check constraints of a function _before_ calling
maybe_instantiate_decl, so that we don't try instantiating a function
(as part of return type deduction) with unsatisfied constraints.
gcc/cp/ChangeLog:
PR c++/95132
* decl2.c (mark_used): Move up the constraints_satisfied_p check
so that we check constraints before calling maybe_instantiate_decl.
gcc/testsuite/ChangeLog:
PR c++/95132
* g++.dg/cpp2a/concepts-fn7.C: New test.