Topic: Inconsistency in aligned_storage specification


Author: Scott Meyers <usenet@aristeia.com>
Date: Fri, 31 Jul 2009 11:58:20 CST
Raw View
On page 558 of N2914, aligned_storage is declared as follows:

    template <std::size_t Len, std::size_t Align> struct aligned_storage;

On page 567 in Table 41, it's declared like this:

    template <std::size_t Len, std::size_t Align = default-alignment>
    struct aligned_storage;

The (non-normative) note after the table declares it this way:

   template <std::size_t Len, std::size_t Alignment> struct aligned_storage;

The inconsistency in template parameter names is not a huge deal, but knowing
whether there's a default value for alignment is kind of important.

Scott

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





Author: "Niels Dekker - no reply address" <invalid@this.is.invalid>
Date: Wed, 5 Aug 2009 15:19:41 CST
Raw View
Scott Meyers wrote:
> On page 558 of N2914, aligned_storage is declared as follows:
>
>    template <std::size_t Len, std::size_t Align> struct
> aligned_storage;
> On page 567 in Table 41, it's declared like this:
>
>    template <std::size_t Len, std::size_t Align = default-alignment>
>    struct aligned_storage;
>
> The (non-normative) note after the table declares it this way:
>
>   template <std::size_t Len, std::size_t Alignment> struct
> aligned_storage;
> The inconsistency in template parameter names is not a huge deal, but
> knowing whether there's a default value for alignment is kind of
> important.

Looks like an editorial (or two).  I'll send it to Pete Becker, editorial
(at) versatilecoding (dot) com

Note that Pete appreciates having square bracketed references, rather than
just page numbers. (In this case: [meta.type.synop] and [meta.trans.other]).

Kind regards, Niels
--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware <http://www.xs4all.nl/%7End/dekkerware>
Scientific programmer at LKEB, Leiden University Medical Center



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





Author: Pete Becker <pete@versatilecoding.com>
Date: Thu, 6 Aug 2009 12:10:40 CST
Raw View
Niels Dekker - no reply address wrote:
>
> Note that Pete appreciates having square bracketed references, rather than
> just page numbers. (In this case: [meta.type.synop] and [meta.trans.other]).
>

And you should, too: the tags don't change in new drafts; page numbers
and section numbers do. Using tags is much less confusing.

--
   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++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]