emlabcpp
modern opinionated embedded C++ library
range.h
Go to the documentation of this file.
1 
24 #pragma once
25 
26 #include "./iterators/numeric.h"
27 #include "./view.h"
28 
29 namespace emlabcpp
30 {
31 
33 template < typename Numeric >
34 constexpr view< iterators::numeric_iterator< Numeric > > range( Numeric from, Numeric to )
35 {
36  return {
39 }
40 
42 template < typename Numeric >
44 {
45  return range< Numeric >( 0, to );
46 }
47 
48 } // namespace emlabcpp
numeric iterator - iterator over numbers (which are calculated on the fly) Value of type T is stored ...
Definition: numeric.h:56
Generic class to represent view of some container.
Definition: view.h:41
MIT License.
Definition: impl.h:31
constexpr view< iterators::numeric_iterator< Numeric > > range(Numeric from, Numeric to)
Builds numeric view over interval [from, to)
Definition: range.h:34