Skip to content

Commit 0e393be

Browse files
committed
eliminate name conflicts when STDEXEC_NAMESPACE is std::execution
1 parent c6b5ff3 commit 0e393be

File tree

73 files changed

+352
-282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+352
-282
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AlignConsecutiveDeclarations: None
99
AlignConsecutiveMacros:
1010
Enabled: true
1111
AcrossEmptyLines: true
12-
AcrossComments: true
12+
AcrossComments: false
1313
AlignEscapedNewlines: Right
1414
AlignOperands: AlignAfterOperator
1515
AlignTrailingComments: true

include/exec/__detail/__basic_sequence.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace exec {
5757
static_cast<_Child&&>(__child)...)) {
5858
}
5959

60-
template <STDEXEC::same_as<__seqexpr> _Self = __seqexpr>
60+
template <STDEXEC::__std::same_as<__seqexpr> _Self = __seqexpr>
6161
auto get_env() const noexcept -> decltype(_Self::__tag().get_env(*this)) {
6262
static_assert(noexcept(_Self::__tag().get_env(*this)));
6363
return _Self::__tag().get_env(*this);

include/exec/async_scope.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ namespace exec {
338338
} else {
339339
std::visit(
340340
[this, &__guard]<class _Tup>(_Tup& __tup) {
341-
if constexpr (same_as<_Tup, std::monostate>) {
341+
if constexpr (__std::same_as<_Tup, std::monostate>) {
342342
std::terminate();
343343
} else {
344344
std::apply(
@@ -465,13 +465,13 @@ namespace exec {
465465
}
466466

467467
template <class _Uy>
468-
requires convertible_to<_Uy*, _Ty*>
468+
requires __std::convertible_to<_Uy*, _Ty*>
469469
__dynamic_delete(std::default_delete<_Uy>)
470470
: __delete_([](_Ty* __p) { delete static_cast<_Uy*>(__p); }) {
471471
}
472472

473473
template <class _Uy>
474-
requires convertible_to<_Uy*, _Ty*>
474+
requires __std::convertible_to<_Uy*, _Ty*>
475475
auto operator=(std::default_delete<_Uy> __d) -> __dynamic_delete& {
476476
__delete_ = __dynamic_delete{__d}.__delete_;
477477
return *this;

include/exec/at_coroutine_exit.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace exec {
121121

122122
template <class _Promise>
123123
concept __has_continuation = requires(_Promise& __promise, __coroutine_handle<> __c) {
124-
{ __promise.continuation() } -> convertible_to<__coroutine_handle<>>;
124+
{ __promise.continuation() } -> __std::convertible_to<__coroutine_handle<>>;
125125
{ __promise.set_continuation(__c) };
126126
};
127127

include/exec/create.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace exec {
3939
struct __operation {
4040
using _Context = __context<STDEXEC::__t<_ReceiverId>, STDEXEC::__t<_ArgsId>>;
4141
using _Result = __call_result_t<_Fun, _Context&>;
42-
using _State = __if_c<same_as<_Result, void>, __void, std::optional<_Result>>;
42+
using _State = __if_c<__std::same_as<_Result, void>, __void, std::optional<_Result>>;
4343

4444
struct __t : STDEXEC::__immovable {
4545
using __id = __operation;
@@ -69,8 +69,8 @@ namespace exec {
6969

7070
template <__decays_to<__t> _Self, receiver_of<completion_signatures> _Receiver>
7171
requires __callable<_Fun, __context<_Receiver, _Args>&>
72-
&& constructible_from<_Fun, __copy_cvref_t<_Self, _Fun>>
73-
&& constructible_from<_Args, __copy_cvref_t<_Self, _Args>>
72+
&& __std::constructible_from<_Fun, __copy_cvref_t<_Self, _Fun>>
73+
&& __std::constructible_from<_Args, __copy_cvref_t<_Self, _Args>>
7474
STDEXEC_EXPLICIT_THIS_BEGIN(auto connect)(this _Self&& __self, _Receiver __rcvr)
7575
-> STDEXEC::__t<__operation<STDEXEC::__id<_Receiver>, _Fun, _ArgsId>> {
7676
static_assert(__nothrow_callable<_Fun, __context<_Receiver, _Args>&>);
@@ -87,8 +87,8 @@ namespace exec {
8787
template <__completion_signature... _Sigs>
8888
struct __create_t {
8989
template <class _Fun, class... _Args>
90-
requires move_constructible<_Fun>
91-
&& constructible_from<__decayed_std_tuple<_Args...>, _Args...>
90+
requires __std::move_constructible<_Fun>
91+
&& __std::constructible_from<__decayed_std_tuple<_Args...>, _Args...>
9292
auto operator()(_Fun __fun, _Args&&... __args) const
9393
-> __t<__sender<_Fun, __id<__decayed_std_tuple<_Args...>>, _Sigs...>> {
9494
return {static_cast<_Fun&&>(__fun), {static_cast<_Args&&>(__args)...}};

include/exec/finally.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ namespace exec {
216216
using __id = __operation_state;
217217

218218
template <class... _Args>
219-
requires constructible_from<__result_variant<__signatures>, __decayed_std_tuple<_Args...>>
219+
requires __std::constructible_from<
220+
__result_variant<__signatures>,
221+
__decayed_std_tuple<_Args...>
222+
>
220223
void __store_result_and_start_next_op(_Args&&... __args) {
221224
this->__result_.__construct(
222225
std::in_place_type<__decayed_std_tuple<_Args...>>, static_cast<_Args&&>(__args)...);

include/exec/into_tuple.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace exec {
7979
_Receiver &__rcvr,
8080
_Tag,
8181
_Args &&...__args) noexcept -> void {
82-
if constexpr (same_as<_Tag, set_value_t>) {
82+
if constexpr (__std::same_as<_Tag, set_value_t>) {
8383
using __tuple_t = __t<_State>;
8484
STDEXEC_TRY {
8585
set_value(

include/exec/linux/io_uring_context.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,15 +695,15 @@ namespace exec {
695695
static constexpr __task_vtable __vtable{&__ready_, &__submit_, &__complete_};
696696

697697
template <class... _Args>
698-
requires STDEXEC::constructible_from<_Base, std::in_place_t, __task*, _Args...>
698+
requires STDEXEC::__std::constructible_from<_Base, std::in_place_t, __task*, _Args...>
699699
__io_task_facade(std::in_place_t, _Args&&... __args)
700700
noexcept(STDEXEC::__nothrow_constructible_from<_Base, __task*, _Args...>)
701701
: __task{__vtable}
702702
, __base_(std::in_place, static_cast<__task*>(this), static_cast<_Args&&>(__args)...) {
703703
}
704704

705705
template <class... _Args>
706-
requires STDEXEC::constructible_from<_Base, _Args...>
706+
requires STDEXEC::__std::constructible_from<_Base, _Args...>
707707
__io_task_facade(std::in_place_t, _Args&&... __args)
708708
noexcept(STDEXEC::__nothrow_constructible_from<_Base, _Args...>)
709709
: __task{__vtable}
@@ -889,7 +889,7 @@ namespace exec {
889889
__on_receiver_stop_t __on_receiver_stop_{};
890890

891891
template <class... _Args>
892-
requires STDEXEC::constructible_from<_Base, _Args...>
892+
requires STDEXEC::__std::constructible_from<_Base, _Args...>
893893
__impl(std::in_place_t, __task* __parent, _Args&&... __args)
894894
noexcept(STDEXEC::__nothrow_constructible_from<_Base, _Args...>)
895895
: __base_t(__parent, std::in_place, static_cast<_Args&&>(__args)...)

include/exec/on_coro_disposition.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace exec {
3939
&& requires(_Promise& __promise) {
4040
{
4141
__promise.disposition()
42-
} -> convertible_to<task_disposition>;
42+
} -> __std::convertible_to<task_disposition>;
4343
};
4444

4545
struct __get_disposition {

include/exec/repeat_effect_until.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ namespace exec {
120120

121121
template <class _Tag, class... _Args>
122122
void __complete(_Tag, _Args &&...__args) noexcept {
123-
if constexpr (same_as<_Tag, set_value_t>) {
123+
if constexpr (__std::same_as<_Tag, set_value_t>) {
124124
// If the sender completed with true, we're done
125125
STDEXEC_TRY {
126126
if constexpr ((__compile_time_bool_of<_Args, true> && ...)) {
@@ -170,7 +170,7 @@ namespace exec {
170170
using __values_t =
171171
// There's something funny going on with __if_c here. Use std::conditional_t instead. :-(
172172
std::conditional_t<
173-
((sizeof...(_Args) == 1) && (convertible_to<_Args, bool> && ...)),
173+
((sizeof...(_Args) == 1) && (__std::convertible_to<_Args, bool> && ...)),
174174
std::conditional_t<
175175
(__compile_time_bool_of<_Args, false> && ...),
176176
completion_signatures<>,

0 commit comments

Comments
 (0)