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 

Re: Allowing definition of file-local private member functio

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





PostPosted: Mon Apr 05, 2004 6:03 pm    Post subject: Re: Allowing definition of file-local private member functio Reply with quote



In article <c34kf8$d2s$1 (AT) news1nwk (DOT) SFbay.Sun.COM>, Steve Clamage
<stephen.clamage (AT) sun (DOT) com> writes
Quote:
John Nagle wrote:
It's been suggested a few times that C++ should allow
definition of private class member functions within
a compilation unit, without requiring that they appear
in the class declaration. The intent is to allow the
addition of private class member functions without modifying
header files. This reduces the impact on large projects
of adding private functions during implementation.

A colleague on the C++ Committee is working on a more general proposal.
It would allow partially-complete class definitions, to be completed in
an implementation file.

The proposal isn't complete yet. If we are not to invalidate current
C++ implementations, the kind of hidden features that can be added is
limited. But adding non-virtual member functions would be allowed.

Well considering the EWG was not overly keen on my proposal to allow a
way of adding to a class interface because it has an impact on overload
resolution I have my doubts that it will get enough support but I am
open to seeing the proposal.

Another possibility is to consider such extensions in the context of my
'explicit class' proposal. As this could be extended to incorporate a
rather different semantics for explicit classes such as making private
members invisible (i.e. do not participate in overload resolution) it
would work more comfortably with adding private function members in the
implementation file.


--
Francis Glassborow ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects

---
[ 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.jamesd.demon.co.uk/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.