Topic: [N2134] small editorial issues with 23.2.1 class template array


Author: "Steve Ward" <planet36@gmail.com>
Date: Mon, 19 Mar 2007 23:02:51 CST
Raw View
These are mostly nitpicks.  :-)



-------------------------------------------------

page 609

23.2.1 class template array

Line 4:
"The effect of calling front() or back() for a zero-sized array is
implementation defined."

Should this sentence be moved to section 23.2.1.5 "Zero sized arrays"
on page 611?
It seems a little out of place because there are no other sentences
concerning zero sized arrays nearby.  They are all in their own
section (23.2.1.5).



-------------------------------------------------

page 609

23.2.1 class template array

"void swap( array<T, N> &);"

There is an extra space after "swap(" that should be removed.



-------------------------------------------------

page 610

The formatting of "23.2.1.3 array size" and "23.2.1.4 array::data" is
different.

As it is now, "size" is bold and in a non-monospaced font, and there
is a "::" in "array::data" where there is none in "array size".

I don't know which is more correct, but the formatting of the text
"array size" and "array::data" should be the consistent.



-------------------------------------------------

page 610

23.2.1.4 array::data

There is no space after the return type of data() in this section.
"T *data();"
"const T *data();"

But there is a space after the return type of data() in the class
header further up the page.
"T *       data();"
"const T * data() const;"



-------------------------------------------------

page 611

23.2.1.5 Zero sized arrays

Line 2:
. "begin() == end() == unique value" ...

Does this imply rbegin() == rend()?



-------------------------------------------------

page 611

23.2.1.6 Tuple inteface to class template array

Line 2: "Value: " ....
('V' is uppercase)

Line 4: "value: " ....
('v' is lowercase)

The captitalization should be consistent.



-------------------------------------------------

page 611

23.2.1.6 Tuple inteface to class template array

Line 3:
"Requires:0 <= I < N. The program is ill-formed if I is out of
bounds."

There should be a space between "Requires:" and "0 <= I < N." as it is
on Lines 5 and 7.

The 'I' in the last sentence ("... if I is ...") is in a non-monospace
font.  This differs from Lines 5 and 7 where 'I' is in a monospace
font.



-------------------------------------------------

page 611

23.2.1.6 Tuple inteface to class template array

. "T& get(array<T, N>& a);"

Does not have "Return type: T&" as does the function below it does.

. "const T& get(const array<T, N>& a);"

Has "Return type: const T&" on Line 8.

For the sake of consistency, I think they should both either have the
statement of "Return type:" or none of them should have it.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: pete@versatilecoding.com (Pete Becker)
Date: Tue, 20 Mar 2007 15:44:52 GMT
Raw View
Steve Ward wrote:
> These are mostly nitpicks.  :-)
>
>
>
> -------------------------------------------------
>
> page 609
>
> 23.2.1 class template array
>
> Line 4:
> "The effect of calling front() or back() for a zero-sized array is
> implementation defined."
>
> Should this sentence be moved to section 23.2.1.5 "Zero sized arrays"
> on page 611?
> It seems a little out of place because there are no other sentences
> concerning zero sized arrays nearby.  They are all in their own
> section (23.2.1.5).
>
>
>
> -------------------------------------------------
>
> page 609
>
> 23.2.1 class template array
>
> "void swap( array<T, N> &);"
>
> There is an extra space after "swap(" that should be removed.
>
>
>
> -------------------------------------------------
>
> page 610
>
> The formatting of "23.2.1.3 array size" and "23.2.1.4 array::data" is
> different.
>
> As it is now, "size" is bold and in a non-monospaced font, and there
> is a "::" in "array::data" where there is none in "array size".
>
> I don't know which is more correct, but the formatting of the text
> "array size" and "array::data" should be the consistent.
>
>
>
> -------------------------------------------------
>
> page 610
>
> 23.2.1.4 array::data
>
> There is no space after the return type of data() in this section.
> "T *data();"
> "const T *data();"
>
> But there is a space after the return type of data() in the class
> header further up the page.
> "T *       data();"
> "const T * data() const;"
>
>
>
> -------------------------------------------------
>
> page 611
>
> 23.2.1.5 Zero sized arrays
>
> Line 2:
> . "begin() == end() == unique value" ...
>
> Does this imply rbegin() == rend()?
>
>
>
> -------------------------------------------------
>
> page 611
>
> 23.2.1.6 Tuple inteface to class template array
>
> Line 2: "Value: " ....
> ('V' is uppercase)
>
> Line 4: "value: " ....
> ('v' is lowercase)
>
> The captitalization should be consistent.
>
>
>
> -------------------------------------------------
>
> page 611
>
> 23.2.1.6 Tuple inteface to class template array
>
> Line 3:
> "Requires:0 <= I < N. The program is ill-formed if I is out of
> bounds."
>
> There should be a space between "Requires:" and "0 <= I < N." as it is
> on Lines 5 and 7.
>
> The 'I' in the last sentence ("... if I is ...") is in a non-monospace
> font.  This differs from Lines 5 and 7 where 'I' is in a monospace
> font.
>
>
>
> -------------------------------------------------
>
> page 611
>
> 23.2.1.6 Tuple inteface to class template array
>
> . "T& get(array<T, N>& a);"
>
> Does not have "Return type: T&" as does the function below it does.
>
> . "const T& get(const array<T, N>& a);"
>
> Has "Return type: const T&" on Line 8.
>
> For the sake of consistency, I think they should both either have the
> statement of "Return type:" or none of them should have it.
>

Editorial.

--

 -- Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com)
Author of "The Standard C++ Library Extensions: a Tutorial and
Reference." (www.petebecker.com/tr1book)

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]