5

When I read some questions, I find people prefer to use something like "§ 27.7.3.6.2/1 [ostream.inserters.arithmetic]" to describe their question.I believe it has something related to C++.

Here is the link address of that question: Formatted output arithmetic inserters

What I want to ask is: What does "§ 27.7.3.6.2/1" refer to? Does it mean a book or something else? If it is a book, please tell me the name of that book.

Community
  • 1
  • 1
MacroFun
  • 51
  • 2

5 Answers5

4

They're refering to the C++ standard.

René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
3

When you're talking about standardised languages like C and C++, it generally refers to the section in the standard (ISO C++ in this case). § 27.7.3.6.2/1 means section 27.7.3.6.2, part 1 of that section.

In C++11, that particular section is:

27.7.3.6.2 Arithmetic inserters [ostream.inserters.arithmetic]

and part 1 of it states:

1 Effects: The classes num_get<> and num_put<> handle locale-dependent numeric formatting and parsing. These inserter functions use the imbued locale value to perform numeric formatting. When val is of type bool, long, unsigned long, long long, unsigned long long, double, long double, or const void*, the formatting conversion occurs as if it performed the following code fragment:

... and so on.

You can get the final versions of the standards (at a cost usually) from your local standards body though you can generally get the final drafts for free on the net that are close to the final versions (although, to be honest, I'm not entirely certain as to the copyright status of these drafts).

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
1

It refers to the section of the document which is getting referred. In the linked question they are referring to C++ standard.

To make it more clear its just like an index in your book which you generally use to refer for fast retrieval. You refer to any particular section by going through that.

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
  • Many thanks.Do you know the name of that document?I find someone esle use it too. For example, http://stackoverflow.com/questions/8239262/why-is-the-address-of-this-volatile-variable-always-at-1 As GMan says, the cv-qualification of the type pointed to should be irrelevant to the business of printing an address. Perhaps the overload defined in 27.7.3.6.2 should be operator<<(const volatile void* val);, I can't immediately see any disadvantage. – MacroFun May 07 '15 at 05:05
  • @barley:- It is very similar to the index which you find on the first page of your book. If you want to refer to any section you refer to the index for fast retrieval. – Rahul Tripathi May 07 '15 at 05:07
1

In this case, it references a part of the C++ ISO standard.

nvoigt
  • 75,013
  • 26
  • 93
  • 142
1

It refers to the C++ standard, also known as "ISO/IEC 14882", an official document published by ISO that specifies the syntax and semantics of the standard C++ language.

Unfortunately the standard is actually more expensive than most books, but you can find drafts online that are close to the official standards. See: Where do I find the current C or C++ standard documents?

So far there have been four standards, published in 1998, 2003, 2011, and 2014, hence the names C++98, C++03, C++11, and C++14. The OP of the other question didn't specify which revision they're referring to. I checked both the 2011 and 2014 standards, and they both have the given quote at the given paragraph number.

The numerical reference, "27.7.3.6.2/1", may change from one revision to the next. "[ostream.inserters.arithmetic]/1" is more stable, since the section names don't change, but paragraph numbers and wording might still change, so it's important to specify which revision you're referring to.

Community
  • 1
  • 1
Brian Bi
  • 111,498
  • 10
  • 176
  • 312