Assembla home | Assembla project page
 

root/trunk/cbear.berlios.de/range/for_each.hpp

Revision 263, 0.5 kB (checked in by sergey_shandar, 5 months ago)

minor

Line 
1 #ifndef CBEAR_BERLIOS_DE_RANGE_FOR_EACH_HPP_INCLUDED
2 #define CBEAR_BERLIOS_DE_RANGE_FOR_EACH_HPP_INCLUDED
3
4 #include <cbear.berlios.de/range/begin.hpp>
5 #include <cbear.berlios.de/range/end.hpp>
6
7 #include <algorithm>
8
9 namespace cbear_berlios_de
10 {
11 namespace range
12 {
13
14 template<class R, class P>
15 void for_each(R const &r, P p)
16 {
17         ::std::for_each(range::begin(r), range::end(r), p);
18 }
19
20 template<class R, class P>
21 void for_each(R &r, P p)
22 {
23         ::std::for_each(range::begin(r), range::end(r), p);
24 }
25
26 }
27 }
28
29 #endif
30
Note: See TracBrowser for help on using the browser.