Skip to content

Commit c8f734d

Browse files
krystian-andrzejewskiigcbot
authored andcommitted
Fix a warning issue related to the overloaded struct
This change is to avoid a warning of using a moved object.
1 parent 6f97888 commit c8f734d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

IGC/Compiler/Optimizer/SynchronizationObjectCoalescing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,9 +1081,9 @@ bool SynchronizationObjectCoalescing::IsReturnOperation(const llvm::Instruction*
10811081
template<class... Ts> struct overloaded : Ts...
10821082
{
10831083
template<typename T>
1084-
overloaded<Ts...>& operator=(T&& lambda)
1084+
overloaded<Ts...>& operator=(const T& lambda)
10851085
{
1086-
((static_cast<Ts&>(*this) = std::forward<T&&>(lambda)), ...);
1086+
((static_cast<Ts&>(*this) = lambda), ...);
10871087
return *this;
10881088
}
10891089

0 commit comments

Comments
 (0)