D7EAD/liboai

error: use of deleted function

Closed this issue · 3 comments

Describe the feature or improvement you're requesting

/usr/include/c++/9/bits/unique_ptr.h:857:30: error: use of deleted function ‘liboai::ChatCompletion::ChatCompletion()’
857 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }

Additional context

No response

Hi,

Could you please provide the code causing this? Also, do you happen to be building in debug mode? If so, switch to release.

Hello, I encountered an error while integrating this package into ROS for catkin build compilation. Of course, the other packages in my ROS only contain # include "liboai. h"

微信图片_20240425103136
When I was compiling this package, the following error occurred:
/usr/include/c++/9/bits/unique_ptr.h:857:30: error: use of deleted function ‘liboai::ChatCompletion::ChatCompletion()’
857 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/lxj/rm_robot/src/rml_63_robot/liboai/include/components/azure.h:13,
from /home/lxj/rm_robot/src/rml_63_robot/liboai/include/liboai.h:32,
from /home/lxj/rm_robot/src/rml_63_robot/rml_63_demo/src/robot.cpp:3:
/home/lxj/rm_robot/src/rml_63_robot/liboai/include/components/chat.h:783:4: note: ‘liboai::ChatCompletion::ChatCompletion()’ is implicitly deleted because the default definition would be ill-formed:
783 | ChatCompletion() = default;
| ^~~~~~~~~~~~~~
/home/lxj/rm_robot/src/rml_63_robot/liboai/include/components/chat.h:783:4: error: use of deleted function ‘constexpr liboai::Network::Network()’
In file included from /home/lxj/rm_robot/src/rml_63_robot/liboai/include/components/../core/authorization.h:19,
from /home/lxj/rm_robot/src/rml_63_robot/liboai/include/components/audio.h:14,
from /home/lxj/rm_robot/src/rml_63_robot/liboai/include/liboai.h:31,
from /home/lxj/rm_robot/src/rml_63_robot/rml_63_demo/src/robot.cpp:3:
/home/lxj/rm_robot/src/rml_63_robot/liboai/include/components/../core/network.h:23:4: note: ‘constexpr liboai::Network::Network() noexcept’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘noexcept (false)’
23 | Network() noexcept = default;