This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR c++/55663 - constexpr function templ instantiation considered non-const as alias templ arg


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> We already have various predicates  to test for constant
> expressions so I am uneasy to add yet another one.

I understand.  I got lost in the number of existing predicates to test
for constant expressions, to the point that I thought (wrongly) the one
I wanted wasn't present.  :-)

> I think reduced_constant_expression_p is what you want.

Thanks.  I didn't realize this would work because the comment of
initializer_constant_valid_p (that it uses) says:

    We assume that VALUE has been folded as much as possible

On a side node, as Jason said in the thread, we might not even need to
touch anything here, as check_instantiated_arg also assumes that its arg
has been fully folded.  I guess I'll propose to update the comment of
that function to reflect that assumption.

Thanks.

-- 
		Dodji


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]