New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn class templates into a member classes of class templates to further narrow scope of ADL #83
Merged
Merged
Changes from 51 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
087e34c
Modify just() to use better ADL insulation techniquesPut sender/opera…
74e5ced
Modify transform() to use better ADL insulation techniques.
ce583d2
Modify finally() to use better ADL insuation techniques.
e1bd2ba
rework transform adl-isolation
a972eca
turn transform into a customizeable algorithm
efc6311
adl-isolate allocate_[sender|operation]
ad2f0db
ADL-isolate awaitable_sender
e56186a
ADL-insulate dematerialize
2d602fc
consistency fixes
47bdaea
ADL-isolate unifex::let
0eb2f74
ADL-insulate unifex::materialize
d530192
ADL insulate unifex::sequence
e2a042e
ADL-insulate unifex::via
50fab33
ADL-insulate when_all
bb40421
ADL-insulate unifex::retry_when
4293adb
avoid gcc warning
d26067c
Merge remote-tracking branch 'origin/master' into adl_isolation
e343681
ADL-isolate unifex::reduce_stream
b394049
ADL-isolate indexed_for
dd1f492
ADL-isolate scheduler CPOs
af45c87
ADL-isolate types in thread_unsafe_event_loop
31ea3a2
ADL-isolate types in timed_single_thread_context
a7f4280
ADL-isolate unifex::with_query_value
6ae5224
review feedback
0535c26
Merge remote-tracking branch 'origin/master' into adl_isolation
917ffd2
ADL-isolate adapt_stream
fc40572
ADL-isolate any_unique; don't deduce noexcept from function type, it'…
d45a7e9
ADL-isolate async_mutex and async_trace
8f8f66c
ADL-isolate unifex::blocking
d74ed04
Merge remote-tracking branch 'origin/master' into adl_isolation
59e55f8
Simplify vtable_entry definition in any_unique.hpp
a437a66
Fix constexpr build issue with continuation_info.
c14bbca
Work around msvc eagerness to instantiate tag_invoke overloads in fin…
8d9e22d
Work around msvc eagerness to instantiate tag_invoke overloads in seq…
99d3b16
ADL-isolate receiver types used by sync_wait() algorithm.
0ee8593
Work around msvc eagerness to instantiate tag_invoke overloads in tra…
ec18cb2
Work around msvc eagerness to instantiate tag_invoke overloads in whe…
178c5a2
Further constrain forwarding tag_invoke() to require is_invocable<CPO…
8cdff10
Add msvc workarounds for materialize/dematerialize algorithms.
3358fd3
Add macros to centalise MSVC-specific workarounds for over eager temp…
5a5a029
Fix typo in when_all().
968a089
various tweaks to make clang happy and to disable ADL
6352bcf
more ADL-isolation
ericniebler fdbf2f1
complex-ify the receiver CPOs to not add default tag_invoke overloads
ericniebler 45e1bea
complex-ify the sender and subschedule CPOs to not add default tag_in…
ericniebler 35cfdd3
more ADL isolation
b307eff
more ADL isolation
0efaa86
more ADL isolation
e615084
more ADL isolation
34dbdda
bring type_erased_stream back from the dead. Add an example.
c773f75
ADL-isolate type-erased stream
8d6006e
Update manual_event_loop.cpp in sync with changes to header.
6b87ce9
Fix syntax error in UNIFEX_DECLARE_NON_DEDUCED_TYPE macro on msvc.
f789f85
Rename_inline namespace to _inline_sched.
1536f07
Fix is_stop_never_possible_v under msvc.
195a864
review feedback
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright 2019-present Facebook, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#include <unifex/for_each.hpp> | ||
#include <unifex/on_stream.hpp> | ||
#include <unifex/range_stream.hpp> | ||
#include <unifex/single_thread_context.hpp> | ||
#include <unifex/type_erased_stream.hpp> | ||
#include <unifex/sync_wait.hpp> | ||
#include <unifex/transform.hpp> | ||
#include <unifex/transform_stream.hpp> | ||
#include <unifex/typed_via_stream.hpp> | ||
|
||
#include <cstdio> | ||
|
||
using namespace unifex; | ||
|
||
int main() { | ||
single_thread_context context1; | ||
single_thread_context context2; | ||
|
||
sync_wait(transform( | ||
for_each( | ||
type_erase<int>( | ||
typed_via_stream( | ||
context1.get_scheduler(), | ||
on_stream( | ||
context2.get_scheduler(), | ||
transform_stream( | ||
range_stream{0, 10}, | ||
[](int value) { return value * value; })))), | ||
[](int value) { std::printf("got %i\n", value); }), | ||
[]() { std::printf("done\n"); })); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to be inconsistent with the naming of the input sender.
We use 'sender', 'source' and 'predecessor' in various places.
Ideally we'd be consistent. Any preferences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong feelings.