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
{
37
iterators::numeric_iterator< Numeric >
{ from },
38
iterators::numeric_iterator< Numeric >
{ to } };
39
}
40
42
template
<
typename
Numeric >
43
constexpr
view< iterators::numeric_iterator< Numeric >
>
range
( Numeric to )
44
{
45
return
range< Numeric >( 0, to );
46
}
47
48
}
// namespace emlabcpp
emlabcpp::iterators::numeric_iterator
numeric iterator - iterator over numbers (which are calculated on the fly) Value of type T is stored ...
Definition:
numeric.h:56
emlabcpp::view
Generic class to represent view of some container.
Definition:
view.h:41
emlabcpp
MIT License.
Definition:
impl.h:31
emlabcpp::range
constexpr view< iterators::numeric_iterator< Numeric > > range(Numeric from, Numeric to)
Builds numeric view over interval [from, to)
Definition:
range.h:34
numeric.h
view.h
include
emlabcpp
range.h
Generated on Sun Jul 27 2025 20:01:11 for emlabcpp by
1.9.1