re PR c++/55942 ([C++11] sorry, unimplemented: calling a member function of the object being constructed in a constant expression)

2014-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55942
	* g++.dg/cpp0x/constexpr-55942.C: New.

From-SVN: r217719
This commit is contained in:
Paolo Carlini 2014-11-18 16:02:58 +00:00 committed by Paolo Carlini
parent bebcdc6742
commit 1b85e4b23b
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-11-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55942
* g++.dg/cpp0x/constexpr-55942.C: New.
2014-11-18 Marek Polacek <polacek@redhat.com>
PR sanitizer/63866

View File

@ -0,0 +1,11 @@
// PR c++/55942
// { dg-do compile { target c++11 } }
struct A
{
constexpr explicit A(bool b) : o{flip(b)} { }
constexpr bool flip(bool b) { return !b; }
bool o;
};