// { dg-do compile } // Contributed by Wolfgang Bangerth // PR c++/9259: Allow non-qualified member calls in sizeof expressions. template struct StaticAssert; template <> struct StaticAssert {}; struct S { static int check (); static double check2 (); static const int value = sizeof(check()); static const int value2 = sizeof(check2()); }; template struct T { static int check (); static double check2 (); static const int value = sizeof(check()); static const int value2 = sizeof(check2()); }; StaticAssert<(S::value == sizeof(int))> s; StaticAssert<(S::value2 == sizeof(double))> s2; StaticAssert<(T::value == sizeof(int))> t; StaticAssert<(T::value2 == sizeof(double))> t2;