Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #162

Why is the operand of alignof restricted to a type?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.litech.org!news.glorb.com!news.alt.net
From Ian Collins<ian-news@hotmail.com>
Newsgroups comp.std.c++
Subject Why is the operand of alignof restricted to a type?
Date Fri, 17 Jun 2011 13:16:10 CST
Organization unknown
Lines 18
Sender std-cpp-request@vandevoorde.com
Approved stephen.clamage@oracle.com
Message-ID <95vdg3FqbqU1@mid.individual.net> (permalink)
Content-Type text/plain; charset=ISO-8859-1; format=flowed
To undisclosed-recipients:;
Return-Path <cppmods@mcgurn.dreamhost.com>
X-Original-Date Fri, 17 Jun 2011 10:13:16 +1200
X-Submission-Address std-c++-submit@vandevoorde.com
Xref x330-a1.tempe.blueboxinc.net comp.std.c++:162

Show key headers only | View raw


This question came up on c.s.c, so I though I'd ask here.

 From 6.5.3.4 sizeof may be applied to an expression or the
parenthesised name of a type while alignof may only be applied to the
parenthesised name of a type.

Is there a reason for the discrepancy?

-- 
Ian Collins


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

Back to comp.std.c++ | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Why is the operand of alignof restricted to a type? Ian Collins<ian-news@hotmail.com> - 2011-06-17 13:16 -0600
  Re: Why is the operand of alignof restricted to a type? Arne Mertz <arnemertz@googlemail.com> - 2011-06-20 10:29 -0600

csiph-web