Re[16]: Для чего шаблонной функции нужна особая сигнатура?
От: Евгений Музыченко Франция https://software.muzychenko.net/ru
Дата: 24.01.23 21:01
Оценка:
Здравствуйте, vopl, Вы писали:

V>я бы не сказал что "шаблонная функция" это давно устоявшееся выражение в литературе и документации, по крайней мере с тем смыслом, которым оно наделено в данном топике (инстанция шаблона функции).


An instantiated function is often called a function instance (instance for short) or a template function.

The compiler creates an instance of the template by replacing the T with the specific type with which we call the template function

The terms function template and template function are sometimes used interchangeably. Strictly, however, a function template is a declaration that specifies a family of overloaded functions. [...] A template function, then, is just an instance of a function template...

The term "function template" refers to a kind of template. The term "template function" is sometimes used to mean the same thing, and sometimes to mean a function instantiated from a function template. This ambiguity is best avoided by using "function template" for the former and something like "function template instance" or "instance of a function template" for the latter.

Вообще, что в русском, что в английском, "шаблоном функции" (function template) сам экземпляр не называют никогда. А вот "шаблонной функцией" (template function) и там, и там могут называть как сам шаблон, так и вызываемое воплощение. При этом смысл, как правило, ясен из контекста.

Ну и часто встречающийся термин non-template function кагбэ намекает, что функция, "не имеющая шаблона", "не порожденная из шаблона", "не заданная шаблоном" и т.п., является "нешаблонной функцией".
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.