Преглед на файлове

Fixed std::move instead of std::forward

Paul-Louis Ageneau преди 2 години
родител
ревизия
78cf08cc25
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      include/rtc/utils.hpp

+ 1 - 1
include/rtc/utils.hpp

@@ -144,7 +144,7 @@ template <typename T> class CheshireCat {
 public:
 public:
 	CheshireCat(impl_ptr<T> impl) : mImpl(std::move(impl)) {}
 	CheshireCat(impl_ptr<T> impl) : mImpl(std::move(impl)) {}
 	template <typename... Args>
 	template <typename... Args>
-	CheshireCat(Args... args) : mImpl(std::make_shared<T>(std::move(args)...)) {}
+	CheshireCat(Args... args) : mImpl(std::make_shared<T>(std::forward<Args>(args)...)) {}
 	CheshireCat(CheshireCat<T> &&cc) { *this = std::move(cc); }
 	CheshireCat(CheshireCat<T> &&cc) { *this = std::move(cc); }
 	CheshireCat(const CheshireCat<T> &) = delete;
 	CheshireCat(const CheshireCat<T> &) = delete;