mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	common/scope_exit: Replace std::move with std::forward in ScopeExit()
The template type here is actually a forwarding reference, not an rvalue reference in this case, so it's more appropriate to use std::forward to preserve the value category of the type being moved.
This commit is contained in:
		
							parent
							
								
									11754778bb
								
							
						
					
					
						commit
						aab503fe71
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -20,7 +20,7 @@ struct ScopeExitHelper { | |||
| 
 | ||||
| template <typename Func> | ||||
| ScopeExitHelper<Func> ScopeExit(Func&& func) { | ||||
|     return ScopeExitHelper<Func>(std::move(func)); | ||||
|     return ScopeExitHelper<Func>(std::forward<Func>(func)); | ||||
| } | ||||
| } // namespace detail
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue