From: Adam Simpkins Date: Sat, 2 Dec 2017 02:01:59 +0000 (-0800) Subject: logging: fix compilation error on older C++ compilers X-Git-Tag: v2017.12.04.00~3 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=ad993b99e320a3e16d1671efe38052f0df203eb4 logging: fix compilation error on older C++ compilers Summary: Add an explicit `std::move()` around the return value of `logConfigToDynamic()`. This explicit move is required pre-C++14, but is not required after DR 1579: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579 Newer versions of g++ and clang no longer require the move. However gcc versions earlier than 5.0 do require it. Reviewed By: yfeldblum Differential Revision: D6466447 fbshipit-source-id: 1b15934490d4966e9b3e5612e0e2ecbb43c979ca --- diff --git a/folly/experimental/logging/LogConfigParser.cpp b/folly/experimental/logging/LogConfigParser.cpp index d0948709..5eb805ac 100644 --- a/folly/experimental/logging/LogConfigParser.cpp +++ b/folly/experimental/logging/LogConfigParser.cpp @@ -548,7 +548,7 @@ dynamic logConfigToDynamic(const LogCategoryConfig& config) { } value("handlers", std::move(handlers)); } - return value; + return std::move(value); } } // namespace folly