Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
1ef613ef
Commit
1ef613ef
authored
Aug 08, 2023
by
Shariar Azad Riday
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate review feedback
parent
605b9f29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
35 deletions
+1
-35
libcaf_core/caf/flow/step/ignore_elements.hpp
libcaf_core/caf/flow/step/ignore_elements.hpp
+1
-13
libcaf_core/caf/flow/step/ignore_elements.test.cpp
libcaf_core/caf/flow/step/ignore_elements.test.cpp
+0
-22
No files found.
libcaf_core/caf/flow/step/ignore_elements.hpp
View file @
1ef613ef
...
...
@@ -4,11 +4,8 @@
#pragma once
#include "caf/detail/ring_buffer.hpp"
#include "caf/fwd.hpp"
#include <cstddef>
namespace
caf
::
flow
::
step
{
template
<
class
T
>
...
...
@@ -18,17 +15,8 @@ public:
using
output_type
=
T
;
explicit
ignore_elements
()
{
// nop
}
ignore_elements
(
ignore_elements
&&
)
=
default
;
ignore_elements
(
const
ignore_elements
&
)
=
default
;
ignore_elements
&
operator
=
(
ignore_elements
&&
)
=
default
;
ignore_elements
&
operator
=
(
const
ignore_elements
&
)
=
default
;
template
<
class
Next
,
class
...
Steps
>
bool
on_next
(
const
input_type
&
item
,
Next
&
next
,
Steps
&
...
steps
)
{
bool
on_next
(
const
input_type
&
,
Next
&
,
Steps
&
...
)
{
return
true
;
}
...
...
libcaf_core/caf/flow/step/ignore_elements.test.cpp
View file @
1ef613ef
...
...
@@ -27,28 +27,6 @@ struct fixture {
WITH_FIXTURE
(
fixture
)
{
TEST
(
"calling take(5) after ignore_elements on range(1, 10) produces []"
)
{
auto
result
=
std
::
vector
<
int
>
{};
SECTION
(
"blueprint"
)
{
ctx
->
make_observable
().
range
(
1
,
10
).
ignore_elements
().
take
(
5
).
for_each
(
[
&
](
const
int
&
result_observable
)
{
result
.
emplace_back
(
result_observable
);
});
}
SECTION
(
"observable"
)
{
ctx
->
make_observable
()
.
range
(
1
,
10
)
.
as_observable
()
.
ignore_elements
()
.
take
(
5
)
.
for_each
([
&
](
const
int
&
result_observable
)
{
result
.
emplace_back
(
result_observable
);
});
}
ctx
->
run
();
check_eq
(
result
.
size
(),
0u
);
}
TEST
(
"calling ignore_elements on range(1, 10) produces []"
)
{
auto
result
=
std
::
vector
<
int
>
{};
SECTION
(
"blueprint"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment