Paolo Carlini
2014-10-08 19:47:38 UTC
Hi,
the below tries to make progress on some relatively easy issues I
noticed while working on c++/55250. At least:
1- We rejected using declarations and using directives in constructors.
2- In C++14 mode we rejected compound-statements both in constructors
and elsewhere (and in C++11 we provided both the pedwarn and then an
hard error)
3- In C++14 mode we rejected local variables in constructors.
The patch itself uses quite straightforward strategies:
check_constexpr_ctor_body is extended via the new
check_constexpr_ctor_body_1; recursion on BIND_EXPRs takes care of
compound-statements; the parser is tweaked to suppress the
"compound-statement in constexpr function" pedwarn in C++14 mode.
Tested x86_64-linux.
Thanks,
Paolo.
//////////////////////
the below tries to make progress on some relatively easy issues I
noticed while working on c++/55250. At least:
1- We rejected using declarations and using directives in constructors.
2- In C++14 mode we rejected compound-statements both in constructors
and elsewhere (and in C++11 we provided both the pedwarn and then an
hard error)
3- In C++14 mode we rejected local variables in constructors.
The patch itself uses quite straightforward strategies:
check_constexpr_ctor_body is extended via the new
check_constexpr_ctor_body_1; recursion on BIND_EXPRs takes care of
compound-statements; the parser is tweaked to suppress the
"compound-statement in constexpr function" pedwarn in C++14 mode.
Tested x86_64-linux.
Thanks,
Paolo.
//////////////////////