forked from boostorg/range
Boost.Range updated the return types of various algorithms to improve consistency. This is to address a specific request made during the formal review of Boost.RangeEx.
[SVN r61211]
This commit is contained in:
1 parent
cab01e8ba3
commit
350a1f8bfc
108 files changed
+937
-605
No files matched your search
@@ -22,7 +22,7 @@ namespace boost
|
||||
{
|
||||
|
||||
template< class ForwardRange, class Value >
|
||||
inline void iota( ForwardRange& rng, Value x )
|
||||
inline ForwardRange& iota( ForwardRange& rng, Value x )
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
|
||||
typedef BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type iterator_t;
|
||||
@@ -30,6 +30,8 @@ inline void iota( ForwardRange& rng, Value x )
|
||||
iterator_t last_target = ::boost::end(rng);
|
||||
for (iterator_t target = ::boost::begin(rng); target != last_target; ++target, ++x)
|
||||
*target = x;
|
||||
|
||||
return rng;
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
|
||||
Reference in new issue
Block a user