Template specialization and instantiation

前端 未结 2 1371
轮回少年
轮回少年 2021-01-12 03:49

These concepts is a bit unclear to me. Well, template instantiation\'s defined pretty well by N4296::14.7 [temp.spec]:

The act of instant

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-12 04:41

    "Instantiating a template specialization" typically refers to the process of implicit instantiation: substituting specific template arguments into a template definition to obtain an instantiated class, function, etc. Instantiating a template means instantiating a specialization of that template. Usually, the less precise phrasing is used when we're talking about some arbitrary instantiation in the context of language lawyering. You will also find the expression "instantiation of a template", which is synonymous with the instantiated specialization.

提交回复
热议问题