// PR c++/52744 // { dg-do compile { target c++11 } } struct T { int a; void b(){} int c(int) { return 1; } }; template struct member_helper; template struct member_helper { static const char* worker() { return "for members"; } }; template struct member_helper { static const char* worker() { return "for member functions returning non void"; } }; template struct member_helper { static const char* worker() { return "for member functions returning void"; } }; void member_test() { member_helper::worker(); member_helper::worker(); member_helper::worker(); } typedef void lua_State; template class function_helper { static_assert(sizeof(T) != sizeof(T), "Error: function_helper works with functions (duh)"); }; template struct function_helper { static int wrapper(lua_State* l) { return 1; } }; template struct function_helper { static int wrapper(lua_State* l) { return 0; } }; int ciao(int){ return 0; } void ciao2(int){} void function_test() { function_helper::wrapper(0); function_helper::wrapper(0); }