[libstdc++-v3 patch] Disambiguate uses of TR1 components when in C++0x mode

Doug Gregor doug.gregor@gmail.com
Thu Jul 12 15:23:00 GMT 2007


When testing libstdc++ under -std=gnu++0x, several of the TR1 test
cases fail because the entities named show up under namespace std::
and namespace std::tr1, causing ambiguities.  This boring patch tweaks
using directives, using declarations, and qualifications in the test
suite to make it run cleanly under C++0x and C++98.

There's still an annoying problem that the PCH for stdtr1c++.h does
not build cleanly under -std=gnu++0x, but it's due to some strange
interaction between header inclusion order and using directives in
std::tr1. My current patch for it is unsatisfactory, so I'll see if I
can come up with anything better before posting that.

Tested i686-pc-linux-gnu with cxx_dialect as cxx0x and cxx98; no regressions.

Okay for mainline?

  - Doug

2007-07-12  Douglas Gregor  <doug.gregor@gmail.com>

	* tr1/3_function_objects/bind/all_bound.cc: Disambiguate uses of
	TR1/C++0x facilities.
	* tr1/3_function_objects/bind/nested.cc: Ditto.
	* tr1/3_function_objects/bind/placeholders.cc: Ditto.
	* tr1/6_containers/unordered_multimap/requirements/explicit_instantiation.cc:
	Ditto.
	* tr1/6_containers/unordered_multimap/swap/1.cc: Ditto.
	* tr1/6_containers/unordered_multimap/swap/2.cc: Ditto.
	* tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc:
	Ditto.
	* tr1/6_containers/unordered_set/swap/1.cc: Ditto.
	* tr1/6_containers/unordered_set/swap/2.cc: Ditto.
	* tr1/6_containers/utility/pair.cc: Ditto.
	* tr1/6_containers/unordered_map/requirements/explicit_instantiation.cc:
	Ditto.
	* tr1/6_containers/unordered_map/24064.cc: Ditto.
	* tr1/6_containers/unordered_map/swap/1.cc: Ditto.
	* tr1/6_containers/unordered_map/swap/2.cc: Ditto.
	* tr1/6_containers/tuple/cons/big_tuples.cc: Ditto.
	* tr1/6_containers/tuple/cons/constructor.cc: Ditto.
	* tr1/6_containers/tuple/cons/assignment.cc: Ditto.
	* tr1/6_containers/tuple/tuple_element.cc: Ditto.
	* tr1/6_containers/tuple/tuple_size.cc: Ditto.
	* tr1/6_containers/tuple/comparison_operators/comparisons.cc:
	Ditto.
	* tr1/6_containers/tuple/element_access/get.cc: Ditto.
	* tr1/6_containers/tuple/creation_functions/23978.cc: Ditto.
	* tr1/6_containers/tuple/creation_functions/tie.cc: Ditto.
	* tr1/6_containers/tuple/creation_functions/make_tuple.cc: Ditto.
	* tr1/6_containers/unordered_multiset/requirements/explicit_instantiation.cc:
	Ditto.
	* tr1/6_containers/unordered_multiset/swap/1.cc: Ditto.
	* tr1/6_containers/unordered_multiset/swap/2.cc: Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libstdc++-tr1-c++0x.patch
Type: text/x-patch
Size: 14959 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070712/753c59f4/attachment.bin>


More information about the Gcc-patches mailing list