There is a formal name for the type of functions designed to utilize template deduction to instantiate their template class counterparts. std::make_pair is a prime example of such a method. The term “helper method” comes to mind, but I recall there being a more specific term… I just can’t remember it.
There is a formal name for the type of functions designed to utilize template
Share
I’m not sure there’s any more official name than “factory function”. I wouldn’t call it a “method” because it doesn’t live on a class.
There’s support for this usage in the Boost docs, as well as in this blog post by Microsoft’s STL guru, Stephen T Lavavej.