Commit d5d8571e authored by Mark Williams's avatar Mark Williams Committed by Facebook Github Bot

Fix std::move warning in folly/gen

Summary:
The std::move prevents copy elision (NRVO), and gcc9 is warning about
it. Every compiler we use will do NRVO here, and in c++17 and later
the compiler is required to use the move constructor if it (for
whatever reason) fails to elide the copy.

Reviewed By: ot

Differential Revision: D19698783

fbshipit-source-id: 589556a0a88da0d84c607c9894399201dd7d6ae8
parent 78486d6a
...@@ -1076,7 +1076,7 @@ class Order : public Operator<Order<Selector, Comparer>> { ...@@ -1076,7 +1076,7 @@ class Order : public Operator<Order<Selector, Comparer>> {
}; };
auto vals = source_ | as<VectorType>(); auto vals = source_ | as<VectorType>();
std::sort(vals.begin(), vals.end(), comparer); std::sort(vals.begin(), vals.end(), comparer);
return std::move(vals); return vals;
} }
public: public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment