logging: fix compilation error on older C++ compilers
authorAdam Simpkins <simpkins@fb.com>
Sat, 2 Dec 2017 02:01:59 +0000 (18:01 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 2 Dec 2017 02:06:19 +0000 (18:06 -0800)
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

folly/experimental/logging/LogConfigParser.cpp

index d0948709d6fd24bbde59ba44499b8fd461476c7e..5eb805ac23610b0eb66d32dadf8c9309973955c9 100644 (file)
@@ -548,7 +548,7 @@ dynamic logConfigToDynamic(const LogCategoryConfig& config) {
     }
     value("handlers", std::move(handlers));
   }
-  return value;
+  return std::move(value);
 }
 
 } // namespace folly