1 // { dg-do compile { target c++11 } }
2 // { dg-additional-options { -Wno-pedantic } }
3 // PR c++/79118 failure to check initialization of anonymous members.
13 constexpr One () : a(), b() {} // { dg-error "multiple" }
14 constexpr One (int) : a() {}
15 constexpr One (unsigned) : b () {}
16 constexpr One (void *) {} // { dg-error "exactly one" "" { target c++17_down } }
32 constexpr Two () : a(), b() {}
33 constexpr Two (int) : a() {} // { dg-error "b' must be initialized" "" { target c++17_down } }
34 constexpr Two (unsigned) : b () {} // { dg-error "a' must be initialized" "" { target c++17_down } }
35 constexpr Two (void *) {} // { dg-error "a' must be initialized" "" { target c++17_down } }
36 // { dg-error "b' must be initialized" "" { target c++17_down } .-1 }