The swap function reports an error when I make_unique #101
Mystletaine
started this conversation in
General
Replies: 1 comment
-
Could you provide a minimal complete buildable example I could check? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I try to use unique_ptr to manage the state machine, the compiler reports an error at make_unique: swap is ambiguous. I don't know how to specify which swap function to use.
code like this, use c++14standard gcc9
std::unique_ptr<path_sampler_statemachine::FSM_P::Instance> fsm_; path_sampler_statemachine::Context ctx_; fsm_ = std::make_unique<path_sampler_statemachine::FSM_P::Instance>(ctx_);
Beta Was this translation helpful? Give feedback.
All reactions