seznam / elasticlient

C++ Elasticsearch client library
https://seznam.github.io/elasticlient/
MIT License
133 stars 67 forks source link

moving a temporary object prevents copy elision #8

Closed kwach closed 5 years ago

kwach commented 5 years ago

Compiling with clang (Apple LLVM version 10.0.0) gives several warnings:

.../elasticlient/src/client.cc:79:11: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
   return std::move(impl->performRequest(method, urlPath, body));

note: remove std::move call here
   return std::move(impl->performRequest(method, urlPath, body));