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 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> Content-Type: text/plain; charset=ISO-8859-1; format=flowed To: undisclosed-recipients:; Return-Path: 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 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 ]