This question on the object generator pattern got me thinking about ways to automate it.
Essentially, I want to automate the creation of functions like std::ma
This is probably a GCC quirk. I can get the following to work with a dev snapshot (I don't have a copy of 4.6 right now):
template<
template class TemplateClass
, typename... Args
, typename Result = TemplateClass
// Also works with the arguably more correct
// , typename Result = TemplateClass<
// typename std::decay::type...
// >
>
Result
make(Args&&... args)
{ /* as before */ }