From -2301754274039814809
X-Google-Thread: f78e5,191c67e7ffa6c8e7,start
X-Google-NewGroupId: yes
X-Google-Attributes: gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news3.google.com!news2.google.com!news.glorb.com!news.alt.net
From: Trigve Siver <trigves@yahoo.com>
Newsgroups: comp.std.c++
Subject: reinterpret_cast<char *>(&some_int)
Date: Mon, 11 Oct 2010 14:07:35 CST
Organization: unknown
Lines: 39
Sender: std-c++-request@ruralroute.cs.rpi.edu
Approved: austern@google.com
Message-ID: <31551.76926.qm@web110410.mail.gq1.yahoo.com>
NNTP-Posting-Host: netlab.cs.rpi.edu
Content-Type: text/plain; charset=us-ascii
To: (Usenet)
Return-Path: <cppmods@assassin.cs.rpi.edu>
X-Hash: SCt|f8f171ceb64f7266bb747ab06ef57da3de5ee016|a9b56d1bd7974621008be1db9b8854d4
X-Countries: United States
X-SMTP-From: accepted <cppmods@assassin.cs.rpi.edu> assassin.cs.rpi.edu [128.113.126.17] (assassin.cs.rpi.edu) {United States}
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=cs.rpi.edu; h=date
	:to:sender:message-id:from:subject:content-type; s=default; i=
	128.113.126.17@cs.rpi.edu; t=1286824055; x=1287428855; l=1112;
	 bh=dem9NxDpWgUeJxJqPBCBd1LGA6M=; b=aO5/ZmiGhmwnDdxtlrI/ZptIOCBj
	6HRi0JunHwpsYRDRt27xTu/RUkqwmzJ3mHFui4UfXbCVTovJJyxiuYO4shMs2fZm
	KPt0lV8OsAQ2H5lp8Y44oo32E+xWn0NYQmBTNuVH6CjY/1+9vizaL7FbvhlqRJ5s
	EvdrmsP4kByQA6A=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=cs.rpi.edu; h=date:to:sender
	:message-id:from:subject:content-type; q=dns; s=default; b=cmM1J
	eOjM5GUYH+wP/a8478tHxaJrGOpXNH5kd8cjBN5LiM3BqDg9IoKJd34E1kMkNQBH
	NG9NhbQa9DsTyNtfLKaURc3IIv3bzgvC+NRbThOZZi1hwUqatt//AfUPFd/7Lqz6
	BV7Nq4UKa9DUinoyaRra/0mTsfXbp3LK8HA2DI=
X-Spam-Report: Spam Report from cliffclavin.cs.rpi.edu (SA:3.2.5):
	-1.8 ALL_TRUSTED            Passed through trusted hosts only via SMTP
	3.4 HEADER_SPAM            Bulk email fingerprint (header-based) found
	2.3 FORGED_YAHOO_RCVD      'From' yahoo.com does not match 'Received' headers
	-0.9 BAYES_00               BODY: Bayesian spam probability is 0 to 1% [score: 0.0000]
	0.2 SARE_HEAD_HDR_APPROV   Message headers used which identify spam
X-Spam-Info: 3.2, local;
	ALL_TRUSTED,BAYES_00,FORGED_YAHOO_RCVD,HEADER_SPAM,
	SARE_HEAD_HDR_APPROV
X-Spam-Scanned-By: cliffclavin.cs.rpi.edu using SpamAssassin 3.2.5
X-Virus-Scanned-By: cliffclavin.cs.rpi.edu
X-Original-Date: Fri, 8 Oct 2010 23:57:44 -0700 (PDT)
X-Submission-Address: std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
X-Scanned-By: MIMEDefang 2.67 on 128.113.126.25
Xref: g2news1.google.com comp.std.c++:3042

Hi,
I've got the question regarding the reinterpret_cast. Is this defined
by c++0x (I mean current working draft n3126)?:

std::ifstrem input(...); // Opened as binary
....
int vaue;
input.read(reinterpret_cast<char *>(&value), sizeof(value)); // Whereinput
"has"
int

And what about reinterpret_cast<char *>(&some_pod)?

I've found this tread [1] where it said that standard doesn't say
whatever it is defined, but it is old. Maybe something has changed.
This is my original thread in c.l.c.m [2].

Thanks

Trigve

[1]
http://groups.google.com/group/comp.std.c++/browse_thread/thread/ee50864e7ed29021/ea62d566b43fd3b9?lnk=gst&q=reinterpret_cast+unsigned+char+*+to+char+*#ea62d566b43fd3b9

[2]
http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/0624841cc278fc1e#





--
[ 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                      ]



