iota.qbk 816 B

123456789101112131415161718192021222324252627282930313233
  1. [/
  2. Copyright 2010 Neil Groves
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. /]
  6. [section:iota iota]
  7. [heading Prototype]
  8. ``
  9. template<class ForwardRange, class Value>
  10. ForwardRange& iota(ForwardRange& rng, Value x);
  11. ``
  12. [heading Description]
  13. `iota` traverses forward through `rng`, each element `y` in `rng` is assigned a value equivalent
  14. to `x + boost::distance(boost::begin(rng), it)`
  15. [heading Definition]
  16. Defined in the header file `boost/range/algorithm_ext/iota.hpp`
  17. [heading Requirements]
  18. # `ForwardRange` is a model of the __forward_range__ Concept.
  19. # `Value` is a model of the `Incrementable` Concept.
  20. [heading Complexity]
  21. Linear. Exactly `distance(rng)` assignments into `rng`.
  22. [endsect]