1.. Copyright David Abrahams 2004. Use, modification and distribution is 2.. subject to the Boost Software License, Version 1.0. (See accompanying 3.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 5:: 6 7 template <class Dereferenceable> 8 struct indirect_reference 9 { 10 typedef /* see below */ type; 11 }; 12 13:Requires: For an object ``x`` of type ``Dereferenceable``, ``*x`` 14 is well-formed. If ``++x`` is ill-formed it shall neither be 15 ambiguous nor shall it violate access control, and 16 ``pointee<Dereferenceable>::type&`` shall be well-formed. 17 Otherwise ``iterator_traits<Dereferenceable>::reference`` shall 18 be well formed. [Note: These requirements need not apply to 19 explicit or partial specializations of ``indirect_reference``] 20 21``type`` is determined according to the following algorithm, where 22``x`` is an object of type ``Dereferenceable``:: 23 24 if ( ++x is ill-formed ) 25 return ``pointee<Dereferenceable>::type&`` 26 else 27 std::iterator_traits<Dereferenceable>::reference 28 29