2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								<?xml version="1.0" encoding="utf-8" ?>  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< html  xmlns = "http://www.w3.org/1999/xhtml"  xml:lang = "en"  lang = "en" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< head >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< meta  http-equiv = "Content-Type"  content = "text/html; charset=utf-8"  / >  
						 
					
						
							
								
									
										
										
										
											2007-07-06 19:47:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< meta  name = "generator"  content = "Docutils 0.5: http://docutils.sourceforge.net/"  / >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< title > Bidirectional Traversal Concept< / title >  
						 
					
						
							
								
									
										
										
										
											2007-07-06 19:47:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< link  rel = "stylesheet"  href = "../../../rst.css"  type = "text/css"  / >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< / head >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< body >  
						 
					
						
							
								
									
										
										
										
											2004-11-02 14:31:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< div  class = "document"  id = "bidirectional-traversal-concept" >  
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< h1  class = "title" > Bidirectional Traversal Concept< / h1 >  
						 
					
						
							
								
									
										
										
										
											2007-07-06 19:47:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								<!--  Copyright David Abrahams 2006. Distributed under the Boost  -->  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								<!--  Software License, Version 1.0. (See accompanying  -->  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								<!--  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)  -->  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< p > A class or built-in type < tt  class = "docutils literal" > < span  class = "pre" > X< / span > < / tt >  models the < em > Bidirectional Traversal< / em >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								concept if, in addition to < tt  class = "docutils literal" > < span  class = "pre" > X< / span > < / tt >  meeting the requirements of Forward
							 
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Traversal Iterator, the following expressions are valid and respect
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								the stated semantics.< / p > 
							 
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< table  border = "1"  class = "docutils" >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< colgroup >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< col  width = "38%"  / >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< col  width = "37%"  / >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< col  width = "25%"  / >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / colgroup >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< thead  valign = "bottom" >  
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tr > < th  class = "head"  colspan = "3" > Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal 
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Iterator)< / th > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / tr >  
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tr > < th  class = "head" > Expression< / th >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< th  class = "head" > Return Type< / th >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< th  class = "head" > Assertion/Semantics / 
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								Pre-/Post-condition< / th > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / tr >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / thead >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< tbody  valign = "top" >  
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tr > < td > < tt  class = "docutils literal" > < span  class = "pre" > --r< / span > < / tt > < / td >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< td > < tt  class = "docutils literal" > < span  class = "pre" > X& < / span > < / tt > < / td >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< td > pre: there exists 
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tt  class = "docutils literal" > < span  class = "pre" > s< / span > < / tt >  such that < tt  class = "docutils literal" > < span  class = "pre" > r< / span >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< span  class = "pre" > ==< / span >  < span  class = "pre" > ++s< / span > < / tt > .  post: 
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tt  class = "docutils literal" > < span  class = "pre" > s< / span > < / tt >  is 
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								dereferenceable.
							 
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tt  class = "docutils literal" > < span  class = "pre" > --(++r)< / span >  < span  class = "pre" > ==< / span >  < span  class = "pre" > r< / span > < / tt > . 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< tt  class = "docutils literal" > < span  class = "pre" > --r< / span >  < span  class = "pre" > ==< / span >  < span  class = "pre" > --s< / span > < / tt >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								implies < tt  class = "docutils literal" > < span  class = "pre" > r< / span >  < span  class = "pre" > ==< / span > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< span  class = "pre" > s< / span > < / tt > . < tt  class = "docutils literal" > < span  class = "pre" > & r< / span >  < span  class = "pre" > ==< / span >  < span  class = "pre" > & --r< / span > < / tt > .< / td >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< / tr >  
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tr > < td > < tt  class = "docutils literal" > < span  class = "pre" > r--< / span > < / tt > < / td >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< td > convertible to < tt  class = "docutils literal" > < span  class = "pre" > const< / span >  < span  class = "pre" > X& < / span > < / tt > < / td >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< td > < pre  class = "first last literal-block" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  X tmp = r;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  --r;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return tmp;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / pre >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / td >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / tr >  
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tr > < td > < tt  class = "docutils literal" > < span  class = "pre" > iterator_traversal< X> ::type< / span > < / tt > < / td >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< td > Convertible to 
						 
					
						
							
								
									
										
										
										
											2006-09-11 22:27:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< tt  class = "docutils literal" > < span  class = "pre" > bidirectional_traversal_tag< / span > < / tt > < / td >  
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< td >   < / td >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / tr >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / tbody >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / table >  
						 
					
						
							
								
									
										
										
										
											2007-07-06 19:47:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< / div >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< div  class = "footer" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< hr  class = "footer"  / >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< a  class = "reference external"  href = "BidirectionalTraversal.rst" > View document source< / a > . 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Generated by < a  class = "reference external"  href = "http://docutils.sourceforge.net/" > Docutils< / a >  from < a  class = "reference external"  href = "http://docutils.sourceforge.net/rst.html" > reStructuredText< / a >  source.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2004-01-27 17:03:46 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< / div >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / body >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / html >