From 3180135598019482531
X-Google-Thread: f78e5,b3d2c9e585ca6370
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII
Path: g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 04 May 2006 11:10:04 -0500
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Original-To: std-c++@mailman.ucar.edu
Delivered-To: std-c++@mailman.ucar.edu
Delivered-To: std-c++@ucar.edu
From: johnchx2@yahoo.com
Newsgroups: comp.std.c++
Subject: Re: Library issue 255 discussion
Organization: http://groups.google.com
Message-ID: <1146755362.562067.26730@i39g2000cwa.googlegroups.com>
References: <e3c0c5$7p0$1@kontener.atcom.net.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Complaints-To: groups-abuse@google.com
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: i39g2000cwa.googlegroups.com; posting-host=207.202.132.38;
   posting-account=1HxwpAwAAABlK5OZfZYCg5RQRtKiYFfE
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by mulga.cs.mu.OZ.AU id k44F9bxU005238
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Date: Thu,  4 May 2006 11:08:11 CST
Lines: 29
NNTP-Posting-Host: 65.182.171.162
X-Trace: sv3-LStsXfJzDCn+8no12sXd7c3B4zmpl8cAzqcvQZSsjHdow+QIHPaCwDQouGXm1Ljo2W0/zulO8Jqs89m!d2D9ertmb6kWuw0XM7/BPpAsgk6mblFXQOKjhOYEboiuCjpOkSRB/DVE+YhZ459C/Owdo9QXuw4G!5kKa/UBdVjbtiuxP4M8BUtf0TDyJ/XRzb6OzsTN0Jg==
X-Complaints-To: abuse@speakeasy.net
X-DMCA-Complaints-To: abuse@speakeasy.net
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.32
Xref: g2news2.google.com comp.std.c++:1779

"Krzysztof �elechowski" wrote:
> In short, gbump and pbump should take an argument of type ptrdiff_t.  Go to
> <http://www.open-std.org/JTC1/SC22/WG21/docs/lwg-closed.html> to get the
> full description.  It appears that this Defect Report has never been posted
> to this group.
>
> Martin Sebor comments in his original posting:
>
> > the change will not affect any user code unless it explicitly relies on
> > the existing type of the functions (e.g., by taking their address).
>
> But this problem is void: user code cannot take the address of gbump because
> gbump is a protected member.

A user-defined class could inherit from basic_streambuf thus gaining
access to its protected members.  Moreover, such a class could
re-declare such members as public, exposing them to the entire
codebase.  As Martin wrote, "Such a possibility is IMO quite remote."
But it is possible and legal.

A nice cautionary tale about the value of protected members....


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



