stlab.adobe.com Adobe Systems Incorporated
distance.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3  Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
4  or a copy at http://stlab.adobe.com/licenses.html)
5 */
6 
7 /*************************************************************************************************/
8 
9 #ifndef ADOBE_ITERATOR_DISTANCE_HPP
10 #define ADOBE_ITERATOR_DISTANCE_HPP
11 
12 #include <adobe/config.hpp>
13 
14 #include <iterator>
15 
16 #include <boost/range/difference_type.hpp>
17 
18 /*************************************************************************************************/
19 
20 namespace adobe {
21 
22 /*************************************************************************************************/
23 
28 template <typename I> // I models InputRange
29 inline boost::difference_type<I>::type distance(I& range)
30 { return std::distance(boost::begin(range), boost::end(range)); }
31 
32 /*************************************************************************************************/
33 
34 } // namespace adobe
35 
36 /*************************************************************************************************/
37 
38 #endif
39 // ADOBE_ITERATOR_DISTANCE_HPP
boost::difference_type< I >::type distance(I &range)
Definition: distance.hpp:29

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google