|
Revision 2, 0.6 kB
(checked in by sergey_shandar, 1 year ago)
|
restoring...
|
| Line | |
|---|
| 1 |
#ifndef CBEAR_BERLIOS_DE_RANGE_SUB_RANGE_HPP_INCLUDED |
|---|
| 2 |
#define CBEAR_BERLIOS_DE_RANGE_SUB_RANGE_HPP_INCLUDED |
|---|
| 3 |
|
|---|
| 4 |
#include <cbear.berlios.de/range/iterator_range.hpp> |
|---|
| 5 |
|
|---|
| 6 |
namespace cbear_berlios_de |
|---|
| 7 |
{ |
|---|
| 8 |
namespace range |
|---|
| 9 |
{ |
|---|
| 10 |
|
|---|
| 11 |
template<class Range> |
|---|
| 12 |
struct sub_range |
|---|
| 13 |
{ |
|---|
| 14 |
typedef iterator_range<typename iterator<Range>::type> type; |
|---|
| 15 |
}; |
|---|
| 16 |
|
|---|
| 17 |
template<class Range> |
|---|
| 18 |
typename sub_range<Range>::type make_sub_range(Range &R) |
|---|
| 19 |
{ |
|---|
| 20 |
return sub_range<Range>::type(R); |
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
template<class Range> |
|---|
| 24 |
typename sub_range<Range const>::type make_sub_range(Range const &R) |
|---|
| 25 |
{ |
|---|
| 26 |
return sub_range<Range const>::type(R); |
|---|
| 27 |
} |
|---|
| 28 |
|
|---|
| 29 |
} |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
#endif |
|---|
| 33 |
|
|---|