This was checked in without review. It is not clear its reasonable to
include with libc++ at all, and needs discussion at a highlevel before
moving forward.
It's also completely lacking tests, and included several bugs in the
implementation.
llvm-svn: 136577
together to get it working with code, and is neither optimal
(erase(Iterator, Iterator) calculates the previous iterator twice,
rather than calculating the previous iterator of the first one, then
advancing it until the second is found) nor complete (splice() was not
implemented). Most of the implementation is borrowed from forward_list
via using-declarations.
llvm-svn: 136542
are two motivations for this.
First, this allows users who are specializing __gnu_ext::hash to
continue doing so without changing their code.
Second, SGI specifies hash overloads for char* and const char* that
perform a hash of the string, not of the pointer.
In order to support this, the hashing code for string is factored out.
llvm-svn: 136539
the type name 'data_type', which is specified by the SGI spec as being
the correct type name for the mapped type. The second is an overload of
insert found in standard containers, taking an iterator as a 'hint'
(which we ignore in the standard containers as well). libstdc++'s
implementation includes these overloads, and they are needed to make
insert_iterator work (which I suspect is the real motivation for
including them in the standard containers).
The motivation for including these overloads of insert and leaving the
mapped_type typedef is to make it easier for clients to migrate to the
standard containers.
llvm-svn: 136538