我遇到make_unique的问题,我不知所措.
_replace_find = unique_ptr<Fl_Input>(new Fl_Input{ 80, 10, 210, 25, "Find:" });
_replace_find = make_unique<Fl_Input>(Fl_Input{ 80, 10, 210, 25, "Find:" });
Run Code Online (Sandbox Code Playgroud)
当我使用make_unique行时它给了我这个错误,但是当我使用另一个时它编译就好了.从我的理解make_unique几乎做同样的事情,但是异常安全.
Error 1 error C2248: 'Fl_Widget::Fl_Widget' : cannot access private member declared in class 'Fl_Widget' c:\program files (x86)\microsoft visual studio 12.0\vc\include\fl\fl_input_.h 488 1 hayley
Run Code Online (Sandbox Code Playgroud)
在SO上,我找不到任何与make_unique或unique_ptr相关的错误.我不会这样问.
一如既往地感谢您的时间和建议.