[Bug c++/67592] New: A virtual member function declared constexpr fails to trigger a diagnostic
andrey.vul at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 15 18:06:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67592
Bug ID: 67592
Summary: A virtual member function declared constexpr fails to
trigger a diagnostic
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: andrey.vul at gmail dot com
Target Milestone: ---
The test case
// begin test.cc
struct S {
constexpr virtual int f() { return 1; }
};
// end test.cc
fails to emit a diagnostic with invocation
g++-6.0.0-alpha20150830 -std=c++11 -Wall -Wextra -pedantic test.cc
C++11 and C++14 [dcl.constexpr]p3.1 state that a constexpr function shall not
be virtual.
More information about the Gcc-bugs
mailing list