fengchen321

Results 3 issues of fengchen321

_uninit_assign 进行构造时,节点数在while之后n变为0后赋值给m_size,应为while之前赋值。

比如reverse_iterator rend() noexcept { return std::make_reverse_iterator(_M_elements); } 这里写成了return std::make_reverse_iterator(_M_elements + _N);

gcc13.1 -std=c++20 部分报错信息如下: https://godbolt.org/z/KzGoGbdvK error: no matching function for call to 'forward(main()::&)' 29 | explicit _FuncImpl(std::in_place_t, _CArgs &&...__args) : _M_f(std::forward(__args)...) {} GPT:std::make_unique 尝试调用 _FuncImpl 的构造函数时,传递的参数类型不匹配导致的。 确保 _FuncImpl 的构造函数能够正确处理函数指针的引用。通过添加一个额外的构造函数来处理。 能编译通过的代码:https://godbolt.org/z/h4KMKoMYc