Sierra Toolkit Version of the Day
Range.hpp
00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2010 - 2011 Sandia Corporation.              */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 #ifndef STK_UTIL_UTIL_RANGE_HPP
00010 #define STK_UTIL_UTIL_RANGE_HPP
00011 
00012 #include <boost/range.hpp>
00013 
00014 namespace stk {
00015 
00016 template <class It>
00017 inline
00018 typename boost::iterator_range<It>::const_iterator const_begin(const boost::iterator_range<It> &range) {
00019   return boost::begin(range);
00020 }
00021 
00022 template <class It>
00023 inline
00024 typename boost::iterator_range<It>::const_iterator const_end(const boost::iterator_range<It> &range) {
00025   return boost::end(range);
00026 }
00027 
00028 template <class It>
00029 inline
00030 typename boost::iterator_range<It>::iterator begin(const boost::iterator_range<It> &range) {
00031   return boost::begin(range);
00032 }
00033 
00034 template <class It>
00035 inline
00036 typename boost::iterator_range<It>::iterator end(const boost::iterator_range<It> &range) {
00037   return boost::end(range);
00038 }
00039 
00040 template <class T>
00041 inline
00042 typename boost::iterator_range<T>::const_iterator const_begin(const boost::sub_range<T> &range) {
00043   return boost::begin(range);
00044 }
00045 
00046 template <class T>
00047 inline
00048 typename boost::iterator_range<T>::const_iterator const_end(const boost::sub_range<T> &range) {
00049   return boost::end(range);
00050 }
00051 
00052 template <class T>
00053 inline
00054 typename boost::iterator_range<T>::iterator begin(const boost::sub_range<T> &range) {
00055   return boost::begin(range);
00056 }
00057 
00058 template <class T>
00059 inline
00060 typename boost::iterator_range<T>::iterator end(const boost::sub_range<T> &range) {
00061   return boost::end(range);
00062 }
00063 
00064 } // namespace stk
00065 
00066 #endif // STK_UTIL_UTIL_RANGE_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends