00001 00002 #ifndef _INSTIGATE_OPEN_SOURCE_INTERNAL_HEADER_IN_CONCEPT 00003 #error This is an internal header file used to implement Instigate STL.\ 00004 It should never be included directly by a program. 00005 #endif 00006 00007 #ifndef INSTIGATE_STL_SINGLE_PASS_ITERATOR_HPP 00008 #define INSTIGATE_STL_SINGLE_PASS_ITERATOR_HPP 00009 00058 // Headers from this project 00059 #include "_incrementable_iterator.hpp" 00060 #include "iterator_interface.hpp" 00061 00062 // Headers from other projects 00063 #include <generic/_equality_comparable.hpp> 00064 00065 // Headers from standard library 00066 #include <iterator> 00067 00068 // Forward declarations 00069 namespace instigate { 00070 namespace stl { 00081 namespace single_pass_iterator { 00082 struct tag; 00083 template<typename T> struct interface; 00084 template<typename T> struct requirements; 00085 } 00086 } 00087 } 00088 00095 struct instigate::stl::single_pass_iterator::tag 00096 : instigate::stl::incrementable_iterator::tag 00097 , instigate::generic::equality_comparable::tag 00098 { 00099 }; 00100 00105 template <typename T> 00106 struct instigate::stl::single_pass_iterator::interface 00107 : instigate::stl::incrementable_iterator::interface<T> 00108 , instigate::generic::equality_comparable::interface<T> 00109 { 00111 typedef typename instigate::stl::interface<T>::difference_type 00112 difference_type; 00113 }; 00114 00122 template <typename T> 00123 struct instigate::stl::single_pass_iterator::requirements 00124 : instigate::stl::incrementable_iterator::requirements<T> 00125 , instigate::generic::equality_comparable::requirements<T> 00126 { 00131 static void require_nested_typename_difference_type() 00132 { 00133 typedef typename instigate::stl::single_pass_iterator:: 00134 interface<T>::difference_type dt; 00135 } 00136 00141 requirements() 00142 { 00143 (void)require_nested_typename_difference_type; 00144 } 00145 }; 00146 00147 // vim:et:tabstop=8:shiftwidth=8:cindent:fo=croq:textwidth=80: 00148 00149 #endif // INSTIGATE_STL_SINGLE_PASS_ITERATOR_HPP