This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, libstdc++] libstdc++ pb_assoc testcase fix
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 06 Jul 2005 16:54:55 -0400
- Subject: [PATCH, libstdc++] libstdc++ pb_assoc testcase fix
A libstdc++ testcase for pb_assoc uses the type map_t, conflicting
with that same type in system headers. The following patch changes the
name to tree_map_t to make it more unique. I can change it to something
else more unique if there are other preferences.
Okay for mainline?
Thanks, David
* tree_order_statistics_join.cc: Change map_t to tree_map_t.
Index: tree_order_statistics_join.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc,v
retrieving revision 1.1
diff -c -p -r1.1 tree_order_statistics_join.cc
*** tree_order_statistics_join.cc 27 Jun 2005 15:30:52 -0000 1.1
--- tree_order_statistics_join.cc 6 Jul 2005 20:51:42 -0000
*************** pb_assoc::tree_assoc_cntnr<
*** 59,72 ****
pb_assoc::order_statistics_key_cmp<std::less<int> >,
pb_assoc::splay_tree_ds_tag,
pb_assoc::order_statistics_node_updator<int> >
! map_t;
int
main()
{
typedef pb_assoc::order_statistics_key< int> int_order_statistics_key;
! map_t s0;
// Insert some entries into s0.
--- 59,72 ----
pb_assoc::order_statistics_key_cmp<std::less<int> >,
pb_assoc::splay_tree_ds_tag,
pb_assoc::order_statistics_node_updator<int> >
! tree_map_t;
int
main()
{
typedef pb_assoc::order_statistics_key< int> int_order_statistics_key;
! tree_map_t s0;
// Insert some entries into s0.
*************** main()
*** 76,88 ****
// The order of the keys should be: 12, 30, 505.
! pb_assoc::find_by_order<map_t> by_order;
assert(by_order(s0, 0)->first == 12);
assert(by_order(s0, 1)->first == 30);
assert(by_order(s0, 2)->first == 505);
! map_t s1;
// Insert some entries into s1.
--- 76,88 ----
// The order of the keys should be: 12, 30, 505.
! pb_assoc::find_by_order<tree_map_t> by_order;
assert(by_order(s0, 0)->first == 12);
assert(by_order(s0, 1)->first == 30);
assert(by_order(s0, 2)->first == 505);
! tree_map_t s1;
// Insert some entries into s1.