This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: protected non-uglified member functions


On May 27, 2002 11:36 pm, Phil Edwards wrote:
> std::deque has two protected template member functions which aren't
> uglified. They're helper versions of insert() which are called from
> the public (templated, range) version of insert.
>
> Are they named like this for a reason?  I'll be changing them to
> something more informative and "ugly" otherwise.

I suspect they're an artifact of prestandard implementation.  I think 
there were similar overloaded dispatch functions (fill insert, range 
insert) in std::list that were renamed a while back and no one has 
complained.

Many of the containers and algorithms have similar specializations 
dispatched from the public nonuglified interface.  It might be a good 
idea to come up with a consistent naming convention to make 
understanding the code a little easier in the future.  I mean, since 
you're renaming them anyways.  A little rule added to C++STYLE or 
something as a reminder for future changes (looked at std::map yet?) 
could aid.  The confusing morass of std::copy is an example of how not 
to name your helper functions.

-- 
Stephen M. Webb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]