From -3987901595171522242 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,10e355266b6fd117 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2002-07-13 12:34:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!kibo.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: Alexander Terekhov Newsgroups: comp.std.c++ Subject: Re: A humble attempt to suggest alignment support for C++ Date: Sat, 13 Jul 2002 19:31:54 GMT Organization: IBM Global Services North -- Burlington, Vermont, USA Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: <3D306952.C418FC82@web.de> References: <3CEA1A08.C6D95CC7@lmf.ericsson.se> <53e3f3b2.0205270557.bdd703d@posting.google.com> <3D2ECDEE.33EE6D72@web.de> Reply-To: terekhov@web.de X-Trace: mail2news.demon.co.uk 1026588720 mail2news:14846 mail2news mail2news.demon.co.uk X-Complaints-To: abuse@demon.net X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 13 Jul 2002 17:53:56 GMT X-Accept-Language: en X-MailScanner: Passed Lines: 64 Xref: archiver1.google.com comp.std.c++:12687 Gabriel Dos Reis wrote: > > Alexander Terekhov writes: > > [...] > > | > I'm not (yet) convinced that a simple type specifier is necessary: A > | > library solution may suffice: > | > > | > std::aligned_storage::type buffer[count] > | > | aligned_storage_pod(T) buffer; // implementation-defined POD type > > std::aligned_storage::type is such a POD. What else am I missing? Uhmm. You wrote: http://groups.google.com/groups?selm=m3bs9gu4hy.fsf%40merlin.nerim.net : requirement that std::aligned_storage::type be a synonymous : for char[sizeof (T)] with the additional attribute that it is suitably : aligned. I personally don't need it to be "synonymous for char[sizeof (T)]" with some magic [w.r.t. conventional chars] "additional attribute that it is suitably aligned". An 'opaque' POD type would be 'sufficient', I think. regards, alexander. P.S. http://groups.google.com/groups?selm=ad35eb%24mpa%241%40news.tuwien.ac.at ("From: Christopher Eltschka (celtschk@web.de)") ".... Solution #4: Provide a built-in "class template" align with the following properties: a) align has the samme alignment restrictions as T b) align has the smallest size compatrible with those alignment restrictions (i.e. sizeof(align) gives the alignment of T) c) align is POD ...." aligned_storage_pod(T) is nothing [b)-above and "void"-max_align aside] but a sort of "typeof" version of >>built-in "class template" align.<< Well, I've noticed this message from Christopher Eltschka AFTER I've sent my reply to your "synonymous for char[sizeof (T)]" article. P.P.S. typeof(x {,aligned_storage_pod|cv-and/or-ref-preserving|whatever})? http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Alignment.html#Alignment http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Typeof.html#Typeof --- [ 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.jamesd.demon.co.uk/csc/faq.html ]