2/15/2009

02-15-09 - Longest compiler error ever

Longest compiler error ever ? And try to guess what I did wrong. Spoiler at the bottom.


c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_hash_map.h(221) : error C2440: 'return' : cannot convert from 'void' to 'stlp_std::hash_map<_Key,_Tp>::size_type'
        with
        [
            _Key=oo::WorkReference,
            _Tp=oo::Worklet *
        ]
        Expressions of type void cannot be converted to other types
        c:\devel\projects\oodle\Core\WorkMgr.cpp(293) : see reference to function template instantiation 'stlp_std::hash_map<_Key,_Tp>::size_type stlp_std::hash_map<_Key,_Tp>::erase<stlp_std::hash_map<_Key,_Tp>::const_iterator>(const _KT &)' being compiled
        with
        [
            _Key=oo::WorkReference,
            _Tp=oo::Worklet *,
            _KT=stlp_std::hash_map<oo::WorkReference,oo::Worklet *>::const_iterator
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(99) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(99) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(99) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(99) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(99) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(99) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(91) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(91) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(91) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(91) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(91) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(91) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(83) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(83) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(83) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(83) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(83) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(83) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(75) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(75) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(75) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(75) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(75) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(75) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(67) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(67) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(67) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(67) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(67) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(67) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(59) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(59) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(59) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(59) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(59) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(59) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(51) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(51) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(51) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(51) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(51) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(51) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(43) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(43) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(43) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(43) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(43) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(43) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(35) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(35) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(35) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(35) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(35) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]
        c:\devel\projects\shared\STLport-5.1.5\stlport\stl\_stdexcept.h(35) : see reference to class template instantiation 'stlp_std::basic_string<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=stlp_std::char_traits<char>,
            _Alloc=stlp_std::allocator<char>
        ]

This is what happens if you pass a hash_map::const_iterator into erase() instead of a hash_map::iterator. LDO.

Oh, and std::string was in no way involved at any point. I have no idea why he decided to contribute a hundred error messages to my hash error.

(the reason for the complex error is partly because erase can either take an iterator or a key; when you pass in the wrong type of iterator, it fails to match the iterator version of erase and goes to the key version of erase, and then tries to template specialize to that type of key, and then tries to make comparison operations and such as if that was a key).

No comments:

old rants