From b0d97129381d3d0fea7dfd784ca6441314781ced Mon Sep 17 00:00:00 2001 From: Ilia Cherniavskii Date: Wed, 27 Mar 2019 21:07:36 -0700 Subject: [PATCH] C++17.h: forward -> c10::guts::forward (#18492) Summary: Use c10::guts::forward instead of forward Pull Request resolved: https://github.com/pytorch/pytorch/pull/18492 Reviewed By: smessmer Differential Revision: D14625513 Pulled By: ilia-cher fbshipit-source-id: 8bc4e20f102fe2a107a22f3e172882d60b95ab0e --- c10/util/C++17.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c10/util/C++17.h b/c10/util/C++17.h index af5bf10..c1c375d 100644 --- a/c10/util/C++17.h +++ b/c10/util/C++17.h @@ -72,7 +72,7 @@ constexpr inline T&& forward(guts::remove_reference_t&& t) noexcept { template typename std::enable_if::value, std::unique_ptr>::type make_unique(Args&&... args) { - return std::unique_ptr(new T(forward(args)...)); + return std::unique_ptr(new T(c10::guts::forward(args)...)); } // Allows 'make_unique(10)'. (N3690 s20.9.1.4 p3-4) template @@ -183,7 +183,7 @@ template using void_t = typename make_void::type; template inline constexpr decltype(auto) apply(F&& f, Tuple&& t) { - return std::apply(forward(f), forward(t)); + return std::apply(c10::guts::forward(f), c10::guts::forward(t)); } #else -- 2.7.4