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?

From Ian Collins<ian-news@hotmail.com>
Newsgroups comp.std.c++
Subject Why is the operand of alignof restricted to a type?
Date 2011-06-17 13:16 -0600
Organization unknown
Message-ID <95vdg3FqbqU1@mid.individual.net> (permalink)

Show all headers | 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


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