removed trivial iterator archetype

[SVN r20489]
This commit is contained in:
Jeremy Siek
2003-10-25 01:48:15 +00:00
parent 47ae00bff5
commit 60e6cc268c

View File

@@ -403,78 +403,6 @@ namespace boost {
//===========================================================================
// Iterator Archetype Classes
template <class T>
struct input_proxy {
operator const T&() { return static_object<T>::get(); }
};
template <class T>
class trivial_iterator_archetype
{
typedef trivial_iterator_archetype self;
public:
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
typedef T value_type;
typedef void reference;
typedef void pointer;
typedef void difference_type;
typedef void iterator_category;
#endif
trivial_iterator_archetype() { }
self& operator=(const self&) { return *this; }
bool operator==(const self&) const { return true; }
bool operator!=(const self&) const { return true; }
input_proxy<T> operator*() const { return input_proxy<T>(); }
};
} // namespace boost
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
namespace std {
template <class T>
struct iterator_traits< boost::trivial_iterator_archetype<T> >
{
typedef T value_type;
};
}
#endif
namespace boost {
template <class T>
struct input_output_proxy {
input_output_proxy<T>& operator=(const T&) { return *this; }
operator const T&() { return static_object<T>::get(); }
};
template <class T>
class mutable_trivial_iterator_archetype
{
typedef mutable_trivial_iterator_archetype self;
public:
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
typedef T value_type;
typedef void reference;
typedef void pointer;
typedef void difference_type;
typedef void iterator_category;
#endif
mutable_trivial_iterator_archetype() { }
self& operator=(const self&) { return *this; }
bool operator==(const self&) const { return true; }
bool operator!=(const self&) const { return true; }
input_output_proxy<T> operator*() const { return input_output_proxy<T>(); }
};
} // namespace boost
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
namespace std {
template <class T>
struct iterator_traits< boost::mutable_trivial_iterator_archetype<T> >
{
typedef T value_type;
};
}
#endif
namespace boost {
template <class T>
class input_iterator_archetype
{