Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++11 example of a value and an object in the standard library?

In C++11 3p3 it states:

An entity is a value, object, reference, function, enumerator, type, class member, template, template specialization, namespace, parameter pack, or this.

In 17.6.1.1p1 it states:

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?, and conversly: What is an example of an object that the C++ standard library provides a definition for, that is not a value?

like image 324
Andrew Tomazos Avatar asked Feb 09 '14 05:02

Andrew Tomazos


1 Answers

The standard iostream objects defined in 27.4.1 [iostreams.objects.overview] such as cin, , cout, cerr and clog (and their wide character cousins) would be examples of objects defined by the Standard Library.

Similarly, the std::ios_base::fmtflags type defined in 27.5.3 [ios.base] has several constexpr values defined (e.g. boolalpha).

like image 71
TemplateRex Avatar answered Sep 30 '22 00:09

TemplateRex