Topic: DR: what is a member-designator?
Author: Krzysztof =?UTF-8?B?xbtlbGVjaG93c2tp?= <giecrilj@stegny.2a.pl>
Date: Mon, 30 Aug 2010 13:31:51 CST Raw View
N3126:18.1/3 says "offsetof (_type_, _member-designator_). What is a
_member-designator_?
--
[ 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: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Date: Mon, 30 Aug 2010 20:11:22 CST Raw View
On 30 Aug., 21:31, Krzysztof elechowski <giecr...@stegny.2a.pl>
wrote:
> N3126:18.1/3 says "offsetof (_type_, _member-designator_). What is a
> _member-designator_?
The C++ standard does not really use this term, it is just part of the
reference to the C Standard. Note that [diff.offsetof] delegates the
complete meaning of the "offsetof" macro to <cstddef> and says
that 18.2 [support.types] describes the *differences*. 18.2 again
says
"The contents are the same as the Standard C library header
<stddef.h>,
with the following changes:"
and among the changes for offsetof, only the "type" part has some
different requirements and the expression as a whole. As of C99,
"member-designator" is a structure member of the type specified
in the first argument. It would not even be necessary to define what
/type/ means, except that the C++ standard clearly gives an extra
rule for a standard-layout class, which is a type category.
HTH & Greetings from Bremen,
Daniel Kr gler
--
[ 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 ]