|
@ -11,7 +11,7 @@ namespace gp{ |
|
|
|
|
|
|
|
|
template<typename it, typename transform> |
|
|
template<typename it, typename transform> |
|
|
auto&& min_of(it beg, it end, transform fn = identity) { |
|
|
auto&& min_of(it beg, it end, transform fn = identity) { |
|
|
gp_config::assertion(beg == end, "min_of provided with empty range"); |
|
|
|
|
|
|
|
|
gp_config::assertion(beg != end, "min_of provided with empty range"); |
|
|
auto fn_v = fn(*beg); |
|
|
auto fn_v = fn(*beg); |
|
|
++beg; |
|
|
++beg; |
|
|
while(beg != end) { |
|
|
while(beg != end) { |
|
|