From 3cd0be21a7e04bbd5416410c0dae69435f6305fd Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Thu, 28 Jul 2005 16:33:20 +0000 Subject: [PATCH] fixed archetypes for count, etc. [SVN r30292] --- stl_concept_covering.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/stl_concept_covering.cpp b/stl_concept_covering.cpp index aa4d241..57485e1 100644 --- a/stl_concept_covering.cpp +++ b/stl_concept_covering.cpp @@ -141,10 +141,9 @@ main() f(dummy_cons); std::for_each(in, in, f); } - // gcc bug { typedef equality_comparable2_first_archetype<> Left; - input_iterator_archetype< Left > in; + input_iterator_archetype in; equality_comparable2_second_archetype<> value(dummy_cons); in = std::find(in, in, value); } @@ -165,10 +164,9 @@ main() pred(dummy_cons); fo = std::adjacent_find(fo, fo, pred); } - // gcc bug { typedef equal_op_first_archetype<> Left; - input_iterator_archetype in; + forward_iterator_archetype in; typedef equal_op_second_archetype<> Right; forward_iterator_archetype fo; in = std::find_first_of(in, in, fo, fo); @@ -191,13 +189,12 @@ main() n = std::count_if(in, in, pred); ignore_unused_variable_warning(n); } - // gcc bug { typedef equal_op_first_archetype<> Left; - typedef input_iterator_archetype InIter1; + typedef input_iterator_archetype InIter1; InIter1 in1; typedef equal_op_second_archetype<> Right; - typedef input_iterator_archetype InIter2; + typedef input_iterator_archetype InIter2; InIter2 in2; std::pair p = std::mismatch(in1, in1, in2); ignore_unused_variable_warning(p); @@ -210,12 +207,11 @@ main() std::pair p = std::mismatch(in1, in1, in2, pred); ignore_unused_variable_warning(p); } - // gcc bug { typedef equality_comparable2_first_archetype<> Left; - input_iterator_archetype in1; + input_iterator_archetype in1; typedef equality_comparable2_second_archetype<> Right; - input_iterator_archetype in2; + input_iterator_archetype in2; bool b = std::equal(in1, in1, in2); ignore_unused_variable_warning(b); } @@ -356,7 +352,7 @@ main() typedef equal_op_first_archetype<> Tin; typedef null_archetype<> Tout; typedef equal_op_second_archetype< convertible_to_archetype > T; - input_iterator_archetype in; + input_iterator_archetype in; output_iterator_archetype out(dummy_cons); T value(dummy_cons); out = std::replace_copy(in, in, out, value, value); @@ -415,13 +411,12 @@ main() unary_predicate_archetype pred(dummy_cons); fi = std::remove_if(fi, fi, pred); } - // gcc bug { typedef null_archetype<> Tout; typedef equality_comparable2_first_archetype< convertible_to_archetype > Tin; typedef equality_comparable2_second_archetype<> T; - input_iterator_archetype in; + input_iterator_archetype in; output_iterator_archetype out(dummy_cons); T value(dummy_cons); out = std::remove_copy(in, in, out, value); @@ -448,10 +443,9 @@ main() binary_predicate_archetype pred(dummy_cons); fi = std::unique(fi, fi, pred); } - // gcc bug { typedef equality_comparable_archetype< sgi_assignable_archetype<> > T; - input_iterator_archetype in; + input_iterator_archetype in; output_iterator_archetype out(dummy_cons); out = std::unique_copy(in, in, out); }