MyTinySTL icon indicating copy to clipboard operation
MyTinySTL copied to clipboard

Linux环境下编译报错

Open ghost opened this issue 3 years ago • 1 comments

报了一堆错误,下面贴出了一部分。该如何解决?? Scanning dependencies of target stltest [ 50%] Building CXX object Test/CMakeFiles/stltest.dir/test.cpp.o In file included from /root/c++/MyTinySTL/Test/list_test.h:8, from /root/c++/MyTinySTL/Test/test.cpp:14: /root/c++/MyTinySTL/Test/../MyTinySTL/list.h: In instantiation of ‘void mystl::list<T>::remove_if(UnaryPredicate) [with UnaryPredicate = bool (*)(int); T = int]’: /root/c++/MyTinySTL/Test/list_test.h:67:3: required from here /root/c++/MyTinySTL/Test/../MyTinySTL/list.h:713:33: warning: implicitly-declared ‘mystl::list_iterator<int>& mystl::list_iterator<int>::operator=(const mystl::list_iterator<int>&)’ is deprecated [-Wdeprecated-copy] 713 | for (auto next = f; f != l; f = next) | ~~^~~~~~ /root/c++/MyTinySTL/Test/../MyTinySTL/list.h:115:3: note: because ‘mystl::list_iterator<int>’ has user-provided ‘mystl::list_iterator<T>::list_iterator(const mystl::list_iterator<T>&) [with T = int]’ 115 | list_iterator(const list_iterator& rhs) | ^~~~~~~~~~~~~

ghost avatar Jul 13 '21 15:07 ghost

没看到error,你可以去cmake的log里找到详细的错误报警

Reisen1969 avatar Jul 17 '21 01:07 Reisen1969