gpt4 book ai didi

c++ - 为什么模板和模板特化实体和类不是?

转载 作者:行者123 更新时间:2023-11-30 03:13:59 24 4
gpt4 key购买 nike

根据标准 §6/p3 [基本]:

An entity is a value, object, reference, structured binding, function, enumerator, type, class member, bit-field, template, template specialization, namespace, or parameter pack.

有一个幼稚的问题。由于模板是“类的蓝图”,为什么模板和模板特化被视为实体而类不是?或者我遗漏了什么?

最佳答案

类包含在列表中,因为类是类型。

关于c++ - 为什么模板和模板特化实体和类不是?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58277241/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com