4 ms·
clang 3.7 has a warning when std::move prevents it from using return value optimization: foo.cpp:44:25: error: moving a temporary object prevents copy elis
by lorenzhs 11y ago
clang 3.7 has a warning when std::move prevents it from using return value optimization:
foo.cpp:44:25: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
auto result = std::move(worker.run());
foo.cpp:44:25: note: remove std::move call here
auto result = std::move(worker.run());
- arto 11y agoThat's a welcome feature indeed. (Too bad the 3.7 release is still a month away.)