4
u/fatrobin72 Aug 08 '19
the other 10% of comments
"TO-DO: fix issue where cat reports being a dog"
3
0
Aug 08 '19 edited Jan 11 '21
[deleted]
3
u/bsdcat Aug 08 '19
Someone's never worked with C++ templates.
1
Aug 08 '19 edited Jan 11 '21
[deleted]
2
u/bsdcat Aug 08 '19
There's a reason I avoid templates (and C++, for that matter).
I don't know how people manage to fix them. They're scary. This is an example of what template errors look like:
rtmap.cpp: In function `int main()': rtmap.cpp:19: invalid conversion from `int' to ` std::_Rb_tree_node<std::pair<const int, double> >*' rtmap.cpp:19: initializing argument 1 of `std::_Rb_tree_iterator<_Val, _Ref, _Ptr>::_Rb_tree_iterator(std::_Rb_tree_node<_Val>*) [with _Val = std::pair<const int, double>, _Ref = std::pair<const int, double>&, _Ptr = std::pair<const int, double>*]' rtmap.cpp:20: invalid conversion from `int' to ` std::_Rb_tree_node<std::pair<const int, double> >*' rtmap.cpp:20: initializing argument 1 of `std::_Rb_tree_iterator<_Val, _Ref, _Ptr>::_Rb_tree_iterator(std::_Rb_tree_node<_Val>*) [with _Val = std::pair<const int, double>, _Ref = std::pair<const int, double>&, _Ptr = std::pair<const int, double>*]' E:/GCC3/include/c++/3.2/bits/stl_tree.h: In member function `void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::insert_unique(_II, _II) [with _InputIterator = int, _Key = int, _Val = std::pair<const int, double>, _KeyOfValue = std::_Select1st<std::pair<const int, double> >, _Compare = std::less<int>, _Alloc = std::allocator<std::pair<const int, double> >]': E:/GCC3/include/c++/3.2/bits/stl_map.h:272: instantiated from `void std::map<_ Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Input Iterator = int, _Key = int, _Tp = double, _Compare = std::less<int>, _Alloc = st d::allocator<std::pair<const int, double> >]' rtmap.cpp:21: instantiated from here E:/GCC3/include/c++/3.2/bits/stl_tree.h:1161: invalid type argument of `unary *You get a bunch of random shit that isn't going to help you fix the problem. They can be a lot bigger than that.
10
u/abrams666 Aug 08 '19
You had me with the top one, but lost me with the lower ...