c++ - C++草案中的单词包是什么?

标签 c++

C++ 草案标准中的 pack 意味着什么 [basic]p3 ?如果无法用精确的术语解释,您能否提供一些具体的解释?

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

最佳答案

该标准还有一个 index如果我们在索引中搜索 pack,我们会得到以下 entry for pack :

pack, [temp.variadic]

这导致 [temp.variadic]p4其中说:

A pack is a template parameter pack, a function parameter pack, or an init-capture pack. The number of elements of a template parameter pack or a function parameter pack is the number of arguments provided for the parameter pack. The number of elements of an init-capture pack is the number of elements in the pack expansion of its initializer.

关于c++ - C++草案中的单词包是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53471276/

相关文章:

c++ - Qt - 设置界面

c++ - unique_ptr 编译器错误,因为将代码从 VS2013 预览导入到 VS2012

c++ - 为什么逻辑 OR 运算符不首先评估带括号的右侧条件?

c++ - "const"是如何实现的?

c++ - 实例化 std::mutex 时出现编译器错误

c++ - 如何删除 setpixel 放在窗口上的内容? (c++)

C++ 重载转换运算符 hack

c++ - Glm 四元数 slerp

java - 多线程异常和锁

c++ - 使用 switch 将名称转换为常量,无需使用丑陋的代码