标准库中值和对象的 C++11 示例?

标签 c++ object c++11 language-lawyer

在 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 对象,例如 cincout cerrclog(以及它们的宽字符表兄弟)将是标准库定义的对象示例。

类似地,27.5.3 [ios.base] 中定义的 std::ios_base::fmtflags 类型定义了多个 constexpr 值(例如 boolalpha)。

关于标准库中值和对象的 C++11 示例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21655523/

相关文章:

c++ - 为什么不允许在 const 非 volatile 成员函数上消除公共(public)子表达式?

python - ImportError : libboost_iostreams. so.1.61.0: 无法打开共享对象文件: 没有这样的文件或目录

javascript - 如何从对象中获取名称的首字母

php - 如何在 PHP 中对数组和数据进行排序?

c++ - 为什么我的异常没有被捕获

c++ - 复制在标准 vector 中只出现一次的元素的最有效方法是什么?

c++ - 如何计算 3d 数组中的索引值在内存中的位置?如何计算 char** 中的索引值在内存中的位置?

c++ - 如何使用divides和for_each?

c++ - 禁用特定函数名称的 "unused function"

jQuery - 如何在另一个对象中存储和访问一个对象