Skip to content

Commit 4b4182e

Browse files
authored
Merge pull request NVIDIA#1981 from gamecentric/main
Fixed compilation warning with -Wshadow
2 parents 9adc43b + c5a7e53 commit 4b4182e

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

include/stdexec/__detail/__any.hpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ namespace STDEXEC::__any
456456
template <class _Value>
457457
struct __box
458458
{
459-
constexpr explicit __box(_Value __value) noexcept
460-
: __val_(std::move(__value))
459+
constexpr explicit __box(_Value __val) noexcept
460+
: __val_(std::move(__val))
461461
{}
462462

463463
template <class... _Args>
@@ -570,12 +570,12 @@ namespace STDEXEC::__any
570570
constexpr _Value &__emplace_into(_Allocator const &__alloc,
571571
__iroot *&__root_ptr,
572572
std::span<std::byte> __buff,
573-
_CvRefValue &&__value)
573+
_CvRefValue &&__val)
574574
{
575575
return STDEXEC::__any::__emplace_into<_Value>(__alloc,
576576
__root_ptr,
577577
__buff,
578-
static_cast<_CvRefValue &&>(__value));
578+
static_cast<_CvRefValue &&>(__val));
579579
}
580580

581581
// reference
@@ -801,9 +801,9 @@ namespace STDEXEC::__any
801801
: __value_root<_Interface, _Value>
802802
, private _Allocator
803803
{
804-
constexpr explicit __value_root_with_allocator(_Value __value,
804+
constexpr explicit __value_root_with_allocator(_Value __val,
805805
_Allocator const &__alloc = _Allocator())
806-
: __value_root<_Interface, _Value>(std::move(__value))
806+
: __value_root<_Interface, _Value>(std::move(__val))
807807
, _Allocator(__alloc)
808808
{}
809809

@@ -928,10 +928,10 @@ namespace STDEXEC::__any
928928
}
929929

930930
template <int = 0, class _CvRefValue, class _Value = std::decay_t<_CvRefValue>>
931-
constexpr _Value &emplace(_CvRefValue &&__value)
931+
constexpr _Value &emplace(_CvRefValue &&__val)
932932
{
933933
__reset_();
934-
return __emplace_<_Value>(static_cast<_CvRefValue &&>(__value));
934+
return __emplace_<_Value>(static_cast<_CvRefValue &&>(__val));
935935
}
936936

937937
[[nodiscard]]
@@ -1344,14 +1344,14 @@ namespace STDEXEC::__any
13441344
}
13451345

13461346
template <class _CvValue>
1347-
constexpr void __value_bind_(_CvValue &__value) noexcept
1347+
constexpr void __value_bind_(_CvValue &__val) noexcept
13481348
{
13491349
static_assert(!__extension_of<_CvValue, _Interface>);
13501350
using __model_type = __reference_model<_Interface, _CvValue>;
13511351
STDEXEC::__any::__emplace_into<__model_type>(std::allocator<std::byte>{}, // not used
13521352
__root_ptr_,
13531353
__buff_,
1354-
std::addressof(__value),
1354+
std::addressof(__val),
13551355
static_cast<__iroot *>(nullptr));
13561356
}
13571357

@@ -1689,11 +1689,11 @@ namespace STDEXEC::__any
16891689
// Construct from an object that implements the interface (and is not an any<>
16901690
// itself)
16911691
template <__model_of<_Interface> _Value, class _Allocator = std::allocator<_Value>>
1692-
constexpr __any(_Value __value, _Allocator const &__alloc = _Allocator())
1692+
constexpr __any(_Value __val, _Allocator const &__alloc = _Allocator())
16931693
: __any()
16941694
{
16951695
static_assert(__simple_allocator<_Allocator>);
1696-
(*this).template __emplace_<_Value>(std::allocator_arg, __alloc, std::move(__value));
1696+
(*this).template __emplace_<_Value>(std::allocator_arg, __alloc, std::move(__val));
16971697
}
16981698

16991699
template <class _Value, class... _Args>
@@ -1733,10 +1733,10 @@ namespace STDEXEC::__any
17331733
}
17341734

17351735
template <__model_of<_Interface> _Value>
1736-
constexpr __any &operator=(_Value __value)
1736+
constexpr __any &operator=(_Value __val)
17371737
{
17381738
__reset(*this);
1739-
(*this).template __emplace_<_Value>(std::move(__value));
1739+
(*this).template __emplace_<_Value>(std::move(__val));
17401740
return *this;
17411741
}
17421742

include/stdexec/__detail/__connect_awaitable.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,15 @@ namespace STDEXEC
254254

255255
static auto __co_impl(__opstate& __op) noexcept -> __task_t
256256
{
257-
using __awaiter_t = decltype(__op.__awaiter_);
257+
using __op_awaiter_t = decltype(__op.__awaiter_);
258258
if constexpr (__same_as<decltype(*__op.__result_), void>)
259259
{
260-
co_await static_cast<__awaiter_t&&>(__op.__awaiter_);
260+
co_await static_cast<__op_awaiter_t&&>(__op.__awaiter_);
261261
__op.__result_.emplace();
262262
}
263263
else
264264
{
265-
__op.__result_.emplace(co_await static_cast<__awaiter_t&&>(__op.__awaiter_));
265+
__op.__result_.emplace(co_await static_cast<__op_awaiter_t&&>(__op.__awaiter_));
266266
}
267267
}
268268

0 commit comments

Comments
 (0)