Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Mon, 25 Feb 2013 11:10:05 -0600 |
| Return-Path | <cppmods@mcgurn.dreamhost.com> |
| Sender | std-cpp-request@vandevoorde.com |
| Approved | stephen.clamage@oracle.com |
| Message-ID | <f29c62f3-e2a4-4a58-9007-39fce9ee6f32@googlegroups.com> (permalink) |
| Newsgroups | comp.std.c++ |
| From | molw5.iwg@googlemail.com |
| Subject | C++11 – Enumeration Aliasing |
| Organization | unknown |
| Content-Type | text/plain; charset=windows-1252 |
| X-Original-Date | Sun, 24 Feb 2013 10:11:50 -0800 (PST) |
| X-Submission-Address | std-cpp-submit@vandevoorde.com |
| To | undisclosed-recipients:; |
| Date | Mon, 25 Feb 2013 11:00:36 CST |
| Lines | 23 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-EhKZyozdKdeq63NAlB7NLikYrkxxVPb5nGKdh0SBhCspv04CVn3Ix+Fy9O9DKzY3JBvUfhf2tv6i+Av!AX0qDQC5RrA+J+UyJRWQLd6YVIU8zr677/Y0oegozTwsmLbnEipm4NhzLxRQE1R1XlX/+kvNMy1l!hIIjyo9yh0Q= |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2153 |
| Xref | csiph.com comp.std.c++:597 |
Show key headers only | View raw
Recently I've been using C++11 enumerations to provide a byte pointer with
stronger strict-aliasing properties. Specifically, I've been using the
definition:
enum byte : uint8_t {};
My reading of the strict-aliasing rules supports the behaviour modern compilers
exhibit in this regard; specifically, byte* aliases only other byte pointers and
raw character points. I'm looking for a second opinion here with respect to the
strict-aliasing rules – additionally, I'd like to know if I'm implicitly relying
on any undefined or implementation-specific behaviour here I may have overlooked.
Thanks in advance,
-molw5
--
[ 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 | Next | Find similar
C++11 – Enumeration Aliasing molw5.iwg@googlemail.com - 2013-02-25 11:00 -0600
csiph-web