Record Detail

Compile Error

In file included from /in/compile/Dlist.h:80:0,
                 from /in/compile/dlist_driver.cpp:6:
/in/DlistImpl.h: In instantiation of 'Dlist<T>& Dlist<T>::operator=(const Dlist<T>&) [with T = int]':
/in/compile/dlist_driver.cpp:213:13:   required from here
/in/DlistImpl.h:88:16: error: binding reference of type 'Dlist<int>&' to 'const Dlist<int>' discards qualifiers
         return l;
                ^
/in/DlistImpl.h:90:5: error: no match for 'operator~' (operand type is 'Dlist<int>')
     ~Dlist();
     ^~~~~~~~
In file included from /usr/include/c++/7/ios:42:0,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from /in/compile/dlist_driver.cpp:3:
/usr/include/c++/7/bits/ios_base.h:95:3: note: candidate: constexpr std::_Ios_Fmtflags std::operator~(std::_Ios_Fmtflags)
   operator~(_Ios_Fmtflags __a)
   ^~~~~~~~
/usr/include/c++/7/bits/ios_base.h:95:3: note:   no known conversion for argument 1 from 'Dlist<int>' to 'std::_Ios_Fmtflags'
/usr/include/c++/7/bits/ios_base.h:137:3: note: candidate: constexpr std::_Ios_Openmode std::operator~(std::_Ios_Openmode)
   operator~(_Ios_Openmode __a)
   ^~~~~~~~
/usr/include/c++/7/bits/ios_base.h:137:3: note:   no known conversion for argument 1 from 'Dlist<int>' to 'std::_Ios_Openmode'
/usr/include/c++/7/bits/ios_base.h:177:3: note: candidate: constexpr std::_Ios_Iostate std::operator~(std::_Ios_Iostate)
   operator~(_Ios_Iostate __a)
   ^~~~~~~~
/usr/include/c++/7/bits/ios_base.h:177:3: note:   no known conversion for argument 1 from 'Dlist<int>' to 'std::_Ios_Iostate'
In file included from /in/compile/Dlist.h:80:0,
                 from /in/compile/dlist_driver.cpp:6:
/in/DlistImpl.h: In instantiation of 'void Dlist<T>::copyAll(const Dlist<T>&) [with T = int]':
/in/DlistImpl.h:81:12:   required from 'Dlist<T>::Dlist(const Dlist<T>&) [with T = int]'
/in/compile/dlist_driver.cpp:124:27:   required from here
/in/DlistImpl.h:110:31: error: invalid conversion from 'int*' to 'int' [-fpermissive]
         insertBack(new T(ptr->op));
                          ~~~~~^~
/in/compile/Makefile:10: recipe for target 'buildDlist' failed
make: *** [buildDlist] Error 1

Information

Submit By
Type
Submission
Homework
Project 5
Language
C++
Submit At
2021-07-29 22:23:52
Judged At
2021-07-29 22:23:52
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes