C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Library issue 255 discussion

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards
View previous topic :: View next topic  
Author Message
Krzysztof Żelechowski
Guest





PostPosted: Thu May 04, 2006 3:21 pm    Post subject: Library issue 255 discussion Reply with quote



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:

Quote:
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 ]
Back to top
Guest






PostPosted: Thu May 04, 2006 4:21 pm    Post subject: Re: Library issue 255 discussion Reply with quote



"Krzysztof Żelechowski" wrote:
Quote:
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 ]
Back to top
sebor@roguewave.com
Guest





PostPosted: Thu May 04, 2006 9:23 pm    Post subject: Re: Library issue 255 discussion Reply with quote



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 ]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.