Commit 2e8e6b3
Fix build on Ubuntu 20.04 (#568)
Remove std::move in return to resolve this build failure:
[ 66%] Building CXX object CMakeFiles/onnxruntime_providers.dir/workspace/onnxruntime/onnxruntime/core/providers/cpu/activation/activations.cc.o
/workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp: In function ‘std::vector<nvinfer1::PluginField> onnx2trt::{anonymous}::loadFields(string_map<std::vector<unsigned char> >&, const OnnxAttrs&, const nvinfer1::PluginFieldCollection*)’:
/workspace/onnxruntime/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);
| ~~~~~~~~~^~~~~~~~
/workspace/onnxruntime/cmake/external/onnx-tensorrt/builtin_op_importers.cpp:3737:21: note: remove ‘std::move’ call
Signed-off-by: David Goodwin <davidg@nvidia.com>
Signed-off-by: Kevin Chen <kevinch@nvidia.com>1 parent 27fb4b0 commit 2e8e6b3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3779 | 3779 | | |
3780 | 3780 | | |
3781 | 3781 | | |
3782 | | - | |
| 3782 | + | |
3783 | 3783 | | |
3784 | 3784 | | |
3785 | 3785 | | |
| |||
0 commit comments