Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: moving a temporary object prevents copy elision #47

Open
osrf-migration opened this issue Nov 20, 2018 · 0 comments
Open

warning: moving a temporary object prevents copy elision #47

osrf-migration opened this issue Nov 20, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@osrf-migration
Copy link

Original report (archived issue) by yurivict (Bitbucket: yurivict).


[10/18] /usr/bin/c++  -Dignition_fuel_tools1_EXPORTS -I/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/include -Iinclude -Icore/include -isystem /usr/local/include/ignition/common3 -isystem /usr/local/include/uuid -isystem /usr/local/include -isystem /usr/local/include/jsoncpp -O2 -pipe -fno-omit-frame-pointer -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer -O2 -pipe -fno-omit-frame-pointer -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic  -fPIC   -msse -msse2 -mfpmath=sse -I/usr/local/include/uuid -I/usr/local/include -I/usr/local/include/jsoncpp -std=c++14 -MD -MT src/CMakeFiles/ignition-fuel_tools1.dir/ModelIter.cc.o -MF src/CMakeFiles/ignition-fuel_tools1.dir/ModelIter.cc.o.d -o src/CMakeFiles/ignition-fuel_tools1.dir/ModelIter.cc.o -c /usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:39:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
  return std::move(ModelIter(std::move(priv)));
         ^
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:39:10: note: remove std::move call here
  return std::move(ModelIter(std::move(priv)));
         ^~~~~~~~~~                          ~
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:46:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
  return std::move(ModelIter(std::move(priv)));
         ^
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:46:10: note: remove std::move call here
  return std::move(ModelIter(std::move(priv)));
         ^~~~~~~~~~                          ~
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:55:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
  return std::move(ModelIter(std::move(priv)));
         ^
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:55:10: note: remove std::move call here
  return std::move(ModelIter(std::move(priv)));
         ^~~~~~~~~~                          ~
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:62:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
  return std::move(ModelIter(std::move(priv)));
         ^
/usr/ports/misc/ignition-fuel-tools/work/ignitionrobotics-ign-fuel-tools-cc74edb0c839b613e6bbf5451852457b4dd6357c/src/ModelIter.cc:62:10: note: remove std::move call here
  return std::move(ModelIter(std::move(priv)));
         ^~~~~~~~~~                          ~
4 warnings generated.

FreeBSD 11.2
clang-6

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 15, 2020
@chapulina chapulina removed the major label May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants