// { dg-do compile } template struct function_traits : public function_traits { }; template struct function_traits { typedef ReturnType (*pointer)(Args...); typedef ReturnType return_type; }; template typename function_traits::pointer FunctionPointer (const Function& lambda) { return static_cast::pointer>(lambda); } template typename function_traits::return_type GetReturnValue (Function func) { typename function_traits::return_type *dummy; return *dummy; } template class ClassFoo {}; template void FuncBar () { } template <> inline void FuncBar () { typedef void (*func_type)(ClassFoo &); func_type f1 = FunctionPointer ([](ClassFoo & ref) { }); }