FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpp11-range/test.cpp at master · harrism/cpp11-range · GitHub
harrism
/
cpp11-range
Public
forked from
klmr/cpp11-range
Notifications
You must be signed in to change notification settings
Fork
5
Star
34
Code
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
cpp11-range
/
test.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (27 loc) · 778 Bytes
Breadcrumbs
cpp11-range
/
test.cpp
Copy path
File metadata and controls
37 lines (27 loc) · 778 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
include
<
iostream
>
#
include
<
vector
>
#
include
"
range.hpp
"
using
std::cout;
using
util::lang::range;
using
util::lang::indices;
int
main
() {
for
(
auto
i :
range
(
1
,
5
))
cout << i <<
"
\n
"
;
for
(
auto
u :
range
(
0u
))
if
(u ==
3u
)
break
;
else
cout << u <<
"
\n
"
;
for
(
auto
c :
range
(
'
a
'
,
'
d
'
))
cout << c <<
"
\n
"
;
for
(
auto
u :
range
(
20u
,
29u
).
step
(
2u
))
cout << u <<
"
\n
"
;
for
(
auto
i :
range
(
100
).
step
(-
3
))
if
(i <
90
)
break
;
else
cout << i <<
"
\n
"
;
std::vector<
int
> x{
1
,
2
,
3
};
for
(
auto
i :
indices
(x))
cout << i <<
'
\n
'
;
for
(
auto
i :
indices
({
"
foo
"
,
"
bar
"
}))
cout << i <<
'
\n
'
;
for
(
auto
i :
indices
(
"
foobar
"
).
step
(
2
))
cout << i <<
'
\n
'
;
}
Back
|
FazBrowse Home
|
New Git URL