1 // { dg-do compile { target c++11 } }
3 struct C { // literal type
6 constexpr C(int m) : m(m), n(-m) {}
7 constexpr bool is_neg() const { return m < 0; }
10 constexpr bool check1(const C& c, int C:: *pm) { return c.*pm < 0; } // #1
12 constexpr bool check2(const C* pc, bool (C::*pm)() const) { return
17 static_assert(!check1(c, &C::n), "Error");
18 static_assert(check1(c, &C::m), "Error");
20 static_assert(check2(&c, &C::is_neg), "Error");