]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem4.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-ptrmem4.C
CommitLineData
fb899e32
JM
1// PR c++/65695
2// { dg-do compile { target c++11 } }
3
4struct Foo;
5
6struct Bar
7{
8 using MemberFuncT = int (Foo::*)();
9
10 MemberFuncT h_;
11 constexpr Bar(MemberFuncT h) : h_{h}
12 {
13 }
14};
15
16struct Foo
17{
18 int test()
19 {
20 return -1;
21 }
22
23 static constexpr Bar bar {&Foo::test};
24};
25
26constexpr Bar Foo::bar;
This page took 3.681415 seconds and 5 git commands to generate.