projects
/
platform
/
upstream
/
boost.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Imported Upstream version 1.57.0
[platform/upstream/boost.git]
/
boost
/
algorithm
/
cxx11
/
iota.hpp
diff --git
a/boost/algorithm/cxx11/iota.hpp
b/boost/algorithm/cxx11/iota.hpp
index
b4f0daf
..
eb32390
100644
(file)
--- a/
boost/algorithm/cxx11/iota.hpp
+++ b/
boost/algorithm/cxx11/iota.hpp
@@
-63,8
+63,8
@@
void iota ( Range &r, T value )
template <typename OutputIterator, typename T>
OutputIterator iota_n ( OutputIterator out, T value, std::size_t n )
{
-
while ( n-- > 0
)
- *out++ = value
++
;
+
for ( ; n > 0; --n, ++value
)
+ *out++ = value;
return out;
}