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

Compile error due to std::move #571

Closed
matthill opened this issue Nov 16, 2020 · 1 comment
Closed

Compile error due to std::move #571

matthill opened this issue Nov 16, 2020 · 1 comment
Labels
bug Something isn't working triaged Issue has been triaged by maintainers

Comments

@matthill
Copy link

Compiling against the latest software on Ubuntu 20.04 and GCC 9, I get the following error:

cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘std::vectornvinfer1::PluginField onnx2trt::{anonymous}::loadFields(string_map<std::vector >&, const OnnxAttrs&, const nvinfer1::PluginFieldCollection*)’:

cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
3737 | return std::move(fields);
| ~~~~~~~~~^~~~~~~~

I see some discussion here: http://www.cplusplus.com/forum/general/186411/

@kevinch-nv
Copy link
Collaborator

This was fixed in #568. Closing.

@kevinch-nv kevinch-nv added bug Something isn't working triaged Issue has been triaged by maintainers labels Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

2 participants