Revert Jeremy Siek's patches for now

[SVN r30299]
This commit is contained in:
Douglas Gregor
2005-07-28 18:22:23 +00:00
parent 3cd0be21a7
commit 6f59ef904b
2 changed files with 19 additions and 14 deletions

View File

@ -408,7 +408,7 @@ namespace boost {
//===========================================================================
// Iterator Archetype Classes
template <class T, int I = 0, class RefBase = null_archetype<> >
template <class T, int I = 0>
class input_iterator_archetype
{
private:
@ -416,8 +416,7 @@ namespace boost {
public:
typedef std::input_iterator_tag iterator_category;
typedef T value_type;
struct reference : public RefBase {
reference(detail::dummy_constructor d) : RefBase(d) { }
struct reference {
operator const value_type&() const { return static_object<T>::get(); }
};
typedef const T* pointer;
@ -425,7 +424,7 @@ namespace boost {
self& operator=(const self&) { return *this; }
bool operator==(const self&) const { return true; }
bool operator!=(const self&) const { return true; }
const reference& operator*() const { return static_object<reference>::get(); }
reference operator*() const { return reference(); }
self& operator++() { return *this; }
self operator++(int) { return *this; }
};

View File

@ -141,9 +141,10 @@ main()
f(dummy_cons);
std::for_each(in, in, f);
}
// gcc bug
{
typedef equality_comparable2_first_archetype<> Left;
input_iterator_archetype<Left, 0, Left> in;
input_iterator_archetype< Left > in;
equality_comparable2_second_archetype<> value(dummy_cons);
in = std::find(in, in, value);
}
@ -164,16 +165,17 @@ main()
pred(dummy_cons);
fo = std::adjacent_find(fo, fo, pred);
}
// gcc bug
{
typedef equal_op_first_archetype<> Left;
forward_iterator_archetype<Left> in;
input_iterator_archetype<Left> in;
typedef equal_op_second_archetype<> Right;
forward_iterator_archetype<Right> fo;
in = std::find_first_of(in, in, fo, fo);
}
{
typedef equal_op_first_archetype<> Left;
typedef input_iterator_archetype<Left, 0, Left> InIter;
typedef input_iterator_archetype<Left> InIter;
InIter in;
function_requires< InputIteratorConcept<InIter> >();
equal_op_second_archetype<> value(dummy_cons);
@ -189,12 +191,13 @@ 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<Left, 0, Left> InIter1;
typedef input_iterator_archetype<Left> InIter1;
InIter1 in1;
typedef equal_op_second_archetype<> Right;
typedef input_iterator_archetype<Right, 1, Right> InIter2;
typedef input_iterator_archetype<Right> InIter2;
InIter2 in2;
std::pair<InIter1, InIter2> p = std::mismatch(in1, in1, in2);
ignore_unused_variable_warning(p);
@ -207,11 +210,12 @@ main()
std::pair<InIter, InIter> p = std::mismatch(in1, in1, in2, pred);
ignore_unused_variable_warning(p);
}
// gcc bug
{
typedef equality_comparable2_first_archetype<> Left;
input_iterator_archetype<Left, 0, Left> in1;
input_iterator_archetype<Left> in1;
typedef equality_comparable2_second_archetype<> Right;
input_iterator_archetype<Right, 1, Right> in2;
input_iterator_archetype<Right> in2;
bool b = std::equal(in1, in1, in2);
ignore_unused_variable_warning(b);
}
@ -352,7 +356,7 @@ main()
typedef equal_op_first_archetype<> Tin;
typedef null_archetype<> Tout;
typedef equal_op_second_archetype< convertible_to_archetype<Tout> > T;
input_iterator_archetype<Tin, 0, Tin> in;
input_iterator_archetype<Tin> in;
output_iterator_archetype<Tout> out(dummy_cons);
T value(dummy_cons);
out = std::replace_copy(in, in, out, value, value);
@ -411,12 +415,13 @@ main()
unary_predicate_archetype<PredArg> pred(dummy_cons);
fi = std::remove_if(fi, fi, pred);
}
// gcc bug
{
typedef null_archetype<> Tout;
typedef equality_comparable2_first_archetype<
convertible_to_archetype<Tout> > Tin;
typedef equality_comparable2_second_archetype<> T;
input_iterator_archetype<Tin, 0, Tin> in;
input_iterator_archetype<Tin> in;
output_iterator_archetype<Tout> out(dummy_cons);
T value(dummy_cons);
out = std::remove_copy(in, in, out, value);
@ -443,9 +448,10 @@ main()
binary_predicate_archetype<Arg1, Arg2> pred(dummy_cons);
fi = std::unique(fi, fi, pred);
}
// gcc bug
{
typedef equality_comparable_archetype< sgi_assignable_archetype<> > T;
input_iterator_archetype<T, 0, T> in;
input_iterator_archetype<T> in;
output_iterator_archetype<T> out(dummy_cons);
out = std::unique_copy(in, in, out);
}