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: [RFA] Status of HP/SGI extensions


On Sun, Dec 30, 2001 at 06:47:40PM +0100, Paolo Carlini wrote:
> What about keeping the helpers (that is, from a practical point of view, those
> names beginning with one or two underscores) insided namespace std, and
> viceversa putting the extension themselves into separate files in namespace
> __gnu_cxx?
> 
> Right now I don't have any better idea.

This appeals to me.  I (personally) feel that the uglified extensions don't
need to be removed from std:: if we're using them as helpers to implement
other things (for example, __uninitialized_copy_fill).  We could leave
those where they are, and document them as helper functions.

Then in ext/* it would simply be a matter of

    namespace __gnu_cxx
    {
        using std::__uninitialized_copy_fill;
    }


stl_deque.h uses some others also.  For example, stl_iterator_base_funcs.h
defines an additional version of std::distance(), taking three parameters.
I just now changed deque::_M_range_initialize as follows:

    -  size_type __n = 0;
    -  distance(__first, __last, __n);
    +  size_type __n = distance(__first, __last);

The 3-parameter distance() extension is one that should be moved into ext,
since we don't need to use it anywhere in bits/*.  Occurrances should be
fixed to use the standard 2-parameter version.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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