Topic: Library issue 255 discussion
Author: krixel@qed.pl ("Krzysztof elechowski")
Date: Thu, 4 May 2006 14:43:26 GMT Raw View
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.
Chris
---
[ 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 ]
Author: johnchx2@yahoo.com
Date: Thu, 4 May 2006 11:08:11 CST Raw View
"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 ]
Author: "sebor@roguewave.com" <sebor@roguewave.com>
Date: Thu, 4 May 2006 15:36:06 CST Raw View
Now might be a good time to revisit the issue since the committee is
actively working on the new standard and planning much bigger changes
than this one.
---
[ 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 ]