protected non-uglified member functions

Stephen M.Webb stephenw@cryptocard.com
Tue May 28 12:40:00 GMT 2002


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



More information about the Libstdc++ mailing list