在 C++11 3p3 中声明:
An entity is a value, object, reference, function, enumerator, type, class member, template, template specialization, namespace, parameter pack, or this.
在 17.6.1.1p1 中声明:
The C++ standard library provides definitions for the following types of entities: macros, values, types, templates, classes, functions, objects.
What is an example of a value that the C++ standard library provides a definition for that is not an object?, 反过来: What is an example of an object that that the C++ standard library provided a definition for, that is not一个值?
最佳答案
27.4.1 [iostreams.objects.overview] 中定义的标准 iostream 对象,例如 cin
、cout
、 cerr
和 clog
(以及它们的宽字符表兄弟)将是标准库定义的对象示例。
类似地,27.5.3 [ios.base] 中定义的 std::ios_base::fmtflags
类型定义了多个 constexpr
值(例如 boolalpha
)。
关于标准库中值和对象的 C++11 示例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21655523/