This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
c++0x tests fixes
- From: François Dumont <francois dot cppdevs at free dot fr>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 29 Nov 2010 21:41:03 +0100
- Subject: c++0x tests fixes
Hi
This is some feedback on tests run in C++0x mode with or without
debug mode.
First failures without debug mode:
23_containers/vector/cons/4.cc
23_containers/deque/cons/2.cc
The code was calling vector and deque constructor taking a size.
Before C++0x it meant contruct N instances as the copy of a default
constructed instance. In C++0x it means contruct N default constructed
instance. I change the code to make copy constructor invocation explicit.
23_containers/deque/requirements/explicit_instantiation/2.cc
23_containers/list/requirements/explicit_instantiation/2.cc
23_containers/vector/requirements/explicit_instantiation/2.cc
The problem is simply that in C++0x mode deque/list/vector
containers cannot be explicitely instanciated with non default
constructible types. Is it a known fact ? If so I think I will introduce
a dg-require-no-experimental-mode to ignore those tests in this mode.
Now 2 debug specific failures:
23_containers/deque/types/1.cc
23_containers/vector/types/1.cc
There is an ambiguity because of an internal iterator check using
operator -(). Both operator-() from the test file itself and the one for
move_iterator could be used. IMO this is again the problem of current
algo design regarding debug mode, the same function is a debug version
or not depending on _GLIBCXX_DEBUG macro rather than having 2 versions
of the function in difference namespace. With this split normal
containers hidden behind debug ones could use normal algos. This is a
big modif for libstdc++ so for the moment I only bypass debug check by
replacing usage of std::copy in __uninit_copy by a direct use of
__copy_move_a2. Normally when calling internal __uninit_copy function
debug checks must already have been performed so there is no debug more
regression.
François
Attachment:
g++0x.patch
Description: Text document