Record Detail

Compile Error

In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h: In instantiation of 'Map<Key_type, Value_type, Key_compare>::Iterator Map<Key_type, Value_type, Key_compare>::begin() const [with Key_type = std::__cxx11::basic_string<char>; Value_type = int; Key_compare = std::less<std::__cxx11::basic_string<char> >; Map<Key_type, Value_type, Key_compare>::Iterator = BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator]':
/in/Compile/Map_compile_check.cpp:68:24:   required from here
/in/Map.h:150:22: error: could not convert '((const Map<std::__cxx11::basic_string<char>, int>*)this)->Map<std::__cxx11::basic_string<char>, int>::bst.BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::begin()' from 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator' to 'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}'
     return bst.begin();
                      ^
/in/Map.h: In instantiation of 'Map<Key_type, Value_type, Key_compare>::Iterator Map<Key_type, Value_type, Key_compare>::begin() const [with Key_type = Duck; Value_type = std::__cxx11::basic_string<char>; Key_compare = DuckWealthLess; Map<Key_type, Value_type, Key_compare>::Iterator = BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator]':
/in/Compile/Map_compile_check.cpp:69:34:   required from here
/in/Map.h:150:22: error: could not convert '((const Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>*)this)->Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::bst.BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::begin()' from 'BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::Iterator' to 'Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::Iterator {aka BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator}'
/in/Map.h: In instantiation of 'Map<Key_type, Value_type, Key_compare>::Iterator Map<Key_type, Value_type, Key_compare>::end() const [with Key_type = std::__cxx11::basic_string<char>; Value_type = int; Key_compare = std::less<std::__cxx11::basic_string<char> >; Map<Key_type, Value_type, Key_compare>::Iterator = BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator]':
/in/Compile/Map_compile_check.cpp:71:22:   required from here
/in/Map.h:155:20: error: could not convert '((const Map<std::__cxx11::basic_string<char>, int>*)this)->Map<std::__cxx11::basic_string<char>, int>::bst.BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::end()' from 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator' to 'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}'
     return bst.end();
                    ^
/in/Map.h: In instantiation of 'Map<Key_type, Value_type, Key_compare>::Iterator Map<Key_type, Value_type, Key_compare>::end() const [with Key_type = Duck; Value_type = std::__cxx11::basic_string<char>; Key_compare = DuckWealthLess; Map<Key_type, Value_type, Key_compare>::Iterator = BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator]':
/in/Compile/Map_compile_check.cpp:72:32:   required from here
/in/Map.h:155:20: error: could not convert '((const Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>*)this)->Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::bst.BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::end()' from 'BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::Iterator' to 'Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::Iterator {aka BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator}'
/in/Map.h: In instantiation of 'Map<Key_type, Value_type, Key_compare>::Iterator Map<Key_type, Value_type, Key_compare>::find(const Key_type&) const [with Key_type = std::__cxx11::basic_string<char>; Value_type = int; Key_compare = std::less<std::__cxx11::basic_string<char> >; Map<Key_type, Value_type, Key_compare>::Iterator = BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator]':
/in/Compile/Map_compile_check.cpp:74:25:   required from here
/in/Map.h:99:24: error: could not convert '((const Map<std::__cxx11::basic_string<char>, int>*)this)->Map<std::__cxx11::basic_string<char>, int>::bst.BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::find(tmp)' from 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator' to 'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}'
     return bst.find(tmp);
                        ^
/in/Map.h: In instantiation of 'Map<Key_type, Value_type, Key_compare>::Iterator Map<Key_type, Value_type, Key_compare>::find(const Key_type&) const [with Key_type = Duck; Value_type = std::__cxx11::basic_string<char>; Key_compare = DuckWealthLess; Map<Key_type, Value_type, Key_compare>::Iterator = BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator]':
/in/Compile/Map_compile_check.cpp:75:39:   required from here
/in/Map.h:99:24: error: could not convert '((const Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>*)this)->Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::bst.BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::find(tmp)' from 'BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::Iterator' to 'Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::Iterator {aka BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator}'
/in/Map.h: In instantiation of 'std::pair<typename BinarySearchTree<std::pair<_T1, _T2>, Map<Key_type, Value_type, Key_compare>::PairComp>::Iterator, bool> Map<Key_type, Value_type, Key_compare>::insert(const Pair_type&) [with Key_type = std::__cxx11::basic_string<char>; Value_type = int; Key_compare = std::less<std::__cxx11::basic_string<char> >; typename BinarySearchTree<std::pair<_T1, _T2>, Map<Key_type, Value_type, Key_compare>::PairComp>::Iterator = BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator; Map<Key_type, Value_type, Key_compare>::Pair_type = std::pair<std::__cxx11::basic_string<char>, int>]':
/in/Compile/Map_compile_check.cpp:80:26:   required from here
/in/Map.h:137:16: error: conversion from 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator' to non-scalar type 'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' requested
       Iterator it=bst.insert(val);
                ^~
/in/Map.h:142:16: error: conversion from 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator' to non-scalar type 'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' requested
       Iterator it=bst.find(val);
                ^~
/in/Map.h: In instantiation of 'std::pair<typename BinarySearchTree<std::pair<_T1, _T2>, Map<Key_type, Value_type, Key_compare>::PairComp>::Iterator, bool> Map<Key_type, Value_type, Key_compare>::insert(const Pair_type&) [with Key_type = Duck; Value_type = std::__cxx11::basic_string<char>; Key_compare = DuckWealthLess; typename BinarySearchTree<std::pair<_T1, _T2>, Map<Key_type, Value_type, Key_compare>::PairComp>::Iterator = BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator; Map<Key_type, Value_type, Key_compare>::Pair_type = std::pair<Duck, std::__cxx11::basic_string<char> >]':
/in/Compile/Map_compile_check.cpp:82:47:   required from here
/in/Map.h:137:16: error: conversion from 'BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::Iterator' to non-scalar type 'Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::Iterator {aka BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator}' requested
       Iterator it=bst.insert(val);
                ^~
/in/Map.h:142:16: error: conversion from 'BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, DuckWealthLess>::Iterator' to non-scalar type 'Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::Iterator {aka BinarySearchTree<std::pair<Duck, std::__cxx11::basic_string<char> >, Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp>::Iterator}' requested
       Iterator it=bst.find(val);
                ^~
/in/Map.h: In instantiation of 'Value_type& Map<Key_type, Value_type, Key_compare>::operator[](const Key_type&) [with Key_type = std::__cxx11::basic_string<char>; Value_type = int; Key_compare = std::less<std::__cxx11::basic_string<char> >]':
/in/Compile/Map_compile_check.cpp:85:21:   required from here
/in/Map.h:120:14: error: conversion from 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator' to non-scalar type 'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' requested
     Iterator it=bst.find(tmp);
              ^~
/in/Map.h:121:11: error: no match for 'operator==' (operand types are 'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' and 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator')
     if (it==bst.end()) {
In file included from /in/Map.h:19:0,
                 from /in/Compile/Map_compile_check.cpp:5:
/in/BinarySearchTree.h:210:10: note: candidate: bool BinarySearchTree<T, Compare>::Iterator::operator==(const BinarySearchTree<T, Compare>::Iterator&) const [with T = std::pair<std::__cxx11::basic_string<char>, int>; Compare = Map<std::__cxx11::basic_string<char>, int>::PairComp]
     bool operator==(const Iterator &rhs) const {
          ^~~~~~~~
/in/BinarySearchTree.h:210:10: note:   no known conversion for argument 1 from 'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, std::less<std::__cxx11::basic_string<char> > >::Iterator' to 'const BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator&'
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/stl_pair.h:448:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:448:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::pair<_T1, _T2>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:302:5: note: candidate: template<class _Iterator> constexpr bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator==(const reverse_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:302:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::reverse_iterator<_Iterator>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:340:5: note: candidate: template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator==(const reverse_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:340:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::reverse_iterator<_Iterator>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:1121:5: note: candidate: template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
     operator==(const move_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1121:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::move_iterator<_IteratorL>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:1127:5: note: candidate: template<class _Iterator> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
     operator==(const move_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1127:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::move_iterator<_IteratorL>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/bits/char_traits.h:40:0,
                 from /usr/include/c++/7/string:40,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/postypes.h:216:5: note: candidate: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
     operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^~~~~~~~
/usr/include/c++/7/bits/postypes.h:216:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::fpos<_StateT>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/string:41:0,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/allocator.h:146:5: note: candidate: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
     operator==(const allocator<_T1>&, const allocator<_T2>&)
     ^~~~~~~~
/usr/include/c++/7/bits/allocator.h:146:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::allocator<_CharT>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/string:41:0,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/bits/allocator.h:152:5: note: candidate: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
     operator==(const allocator<_Tp>&, const allocator<_Tp>&)
     ^~~~~~~~
/usr/include/c++/7/bits/allocator.h:152:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'Map<std::__cxx11::basic_string<char>, int>::Iterator {aka BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator}' is not derived from 'const std::allocator<_CharT>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/bits/basic_string.h:48:0,
                 from /usr/include/c++/7/string:52,
                 from /in/Compile/Map_compile_check.cpp:3:
/usr/include/c++/7/string_view:450:5: note: candidate: template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)
     operator==(basic_string_view<_CharT, _Traits> __x,
     ^~~~~~~~
/usr/include/c++/7/string_view:450:5: note:   template argument deduction/substitution failed:
In file included from /in/Compile/Map_compile_check.cpp:5:0:
/in/Map.h:121:11: note:   'BinarySearchTree<std::pair<std::__cxx11::basic_string<char>, int>, Map<std::__cxx11::basic_string<char>, int>::PairComp>::Iterator' is not derived from 'std::basic_string_view<_CharT, _Traits>'
     if (it==bst.end()) {
In file included from /usr/include/c++/7/bits/basic_string.h:

Information

Submit By
Type
Submission
Homework
Project 5
Language
C++
Submit At
2024-06-28 21:24:12
Judged At
2024-06-28 21:24:12
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes