PR c++/66297, DR 1684 - literal class and constexpr member fns
authorJason Merrill <jason@redhat.com>
Tue, 9 May 2017 20:37:44 +0000 (16:37 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 9 May 2017 20:37:44 +0000 (16:37 -0400)
commit54069e595976eb556b22c231951cb2703e523a22
treeb327c9852bc468cfe651509559b443ca822580d2
parent8ef2b9a7b59418d9f5e644badbc0aade7f83414f
PR c++/66297, DR 1684 - literal class and constexpr member fns

* constexpr.c (is_valid_constexpr_fn): Only complain about
non-literal enclosing class in C++11.
* class.c (finalize_literal_type_property): Likewise.

From-SVN: r247813
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/constexpr.c
gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C
gcc/testsuite/g++.dg/cpp1y/constexpr-dr1684.C [new file with mode: 0644]