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_INCREMENTABLE_ITERATOR_HPP 00008 #define INSTIGATE_STL_INCREMENTABLE_ITERATOR_HPP 00009 00059 // Headers from this project 00060 #include "iterator_interface.hpp" 00061 00062 // Headers from other project 00063 #include <generic/_assignable.hpp> 00064 00065 // Headers from standard project 00066 00067 // Forward declarations 00068 namespace instigate { 00069 namespace stl { 00081 namespace incrementable_iterator { 00082 struct tag; 00083 template<typename T> struct interface; 00084 template<typename T> struct requirements; 00085 } 00086 } 00087 } 00088 00095 struct instigate::stl::incrementable_iterator::tag 00096 : instigate::generic::assignable::tag 00097 { 00098 }; 00099 00100 namespace instigate { 00101 namespace stl { 00102 template <typename T> struct category_mapping; 00103 } 00104 } 00105 00111 template<typename T> 00112 struct instigate::stl::incrementable_iterator::interface 00113 : instigate::generic::assignable::interface<T> 00114 { 00116 typedef typename instigate::stl::category_mapping<T>::category 00117 iterator_category; 00118 00123 static void increment(T& a) 00124 { 00125 instigate::stl::interface<T>::increment(a); 00126 } 00127 }; 00128 00137 template<typename T> 00138 struct instigate::stl::incrementable_iterator::requirements 00139 : instigate::generic::assignable::requirements<T> 00140 { 00145 static void require_nested_typename_iterator_category() 00146 { 00147 typedef typename instigate::stl::incrementable_iterator:: 00148 interface<T>::iterator_category d; 00149 } 00150 00155 static void require_increment(T& a) 00156 { 00157 instigate::stl::incrementable_iterator::interface<T>:: 00158 increment(a); 00159 } 00160 00167 requirements() 00168 { 00169 (void)require_nested_typename_iterator_category; 00170 (void)require_increment; 00171 } 00172 }; 00173 00174 // vim:et:tabstop=8:shiftwidth=8:cindent:fo=croq:textwidth=80: 00175 00176 #endif // INSTIGATE_STL_INCREMENTABLE_ITERATOR_HPP