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] |
Sending up the testsuite changes for the non-std pointer support, along with associated code. This set of patches is ready for evaluation/commit. Hereafter, I'll just be looking to do the same to the other container types, until all are compliant. The change to the testsuite is minimal - I've added a 'check-nonstd-pointer' target. When run, it creates a patched version of std::allocator in the build/.../testsuite/nonstd_pointer directory which uses a non-standard pointer type (_gcc_cxx::__pointer<>), and then runs the standard 'check-DEJAGNU' target (i.e. all tests) using that allocator. Consequently, all containers which support non-std pointers get tested in that mode. For those that don't support non-std pointers, it guarantees that they ignore the pointer typedef in the allocator correctly. Attached Files (14): (new) ext/cast.h - provides the _gcc_cxx::__cast_to' struct to allow conversion operator overloading by custom pointer types. (new) ext/pointer.h - a _gcc_cxx::__pointer<> template to serve 2 purposes. 1) demo a pointer that works, 2) provide a reusable pointer shell. __pointer takes a simpler pointer_impl template parameter, making it easy to write a custom pointer without having to reinvent all the appropriate supporting code (pointer arithmetic, comparison operations, implicit casts, etc.) encapsulated in __pointer. 2 sample impls are provided. testsuite_Makefile.am.patch - patch to the testsuite/Makefile.am, adding 'check-nonstd-pointer' target. testsuite_Makefile.in.patch - patch to the testsuite/Makefile.in (both were in svn, so I'm providing both) libstdc++-v3/scripts/nonstd_allocator.patch - patch file for check-nonstd-pointer test, produces non standard allocator map_1_neg.cc.path - patch to testsuite/23_containers/map/operators/1_neg.cc - minor change to realign error message line numbers. set_1_neg.cc.path - patch to testsuite/23_containers/set/operators/1_neg.cc - ditto. include_Makefile.am.patch - patch to include/Makefile.am to add bits/stl_tree.tcc, ext/cast.h ext/pointer.h include_Makefile.in.patch - patch to include/Makefile.in to add bits/stl_tree.tcc, ext/cast.h ext/pointer.h bits/stl_tree.h.patch - additional changes to use __cast_to<> consistently everywhere where a custom pointer might want to overload the standard pointer cast operators (static_cast<>, etc.) This supersedes the last version of this patch that I posted. bits/stl_tree.tcc - additional changes from last posted version of this new file to fix some problems revealed by the testsuite. Let me know if you want a diff. This supersedes the last version of this file that I posted. bits/stl_vector.h.patch - vector support for non-std pointer. bits/basic_string.h.patch - basic_string support for non-std pointer. bits/stl_deque.h - small patch to allow deque to work if the allocator::pointer is a non-standard pointer type. Current code does not compile if allocator::pointer is not _Tp*, so I just made the standard pointer assumption hard-coded for now ..., so the test suite will work. Status of Testing: The only difference that I am seeing with the testsuite right now between 'make check' prior to this patch, and 'make check-nonstd-pointer' after this patch is 1 additional failure. (3/4 total on my system). The additional failure is in 21_strings/basic_string/init-list.cc; getting some sort of strange link error associated with basic_string. I will look into this. I suspect it is something related to c++0X and may be in flux. Please let me know if you need me to do anything further in regard to this code. I'm stopping here until this is ironed out, and will then proceed with the other STL and ext containers. - Bob
Attachment:
cast.h
Description: Binary data
Attachment:
basic_string.h.patch
Description: Binary data
Attachment:
include_Makefile.am.patch
Description: Binary data
Attachment:
include_Makefile.in.patch
Description: Binary data
Attachment:
map_1_neg.cc.patch
Description: Binary data
Attachment:
nonstd_allocator.patch
Description: Binary data
Attachment:
pointer.h
Description: Binary data
Attachment:
set_1_neg.cc.patch
Description: Binary data
Attachment:
stl_deque.h.patch
Description: Binary data
Attachment:
stl_tree.h.patch
Description: Binary data
Attachment:
stl_tree.tcc
Description: Binary data
Attachment:
stl_tree.tcc
Description: Binary data
Attachment:
stl_vector.h.patch
Description: Binary data
Attachment:
testsuite_Makefile.am.patch
Description: Binary data
Attachment:
testsuite_Makefile.in.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |