
Has anyone had trouble with complex template code when moving from gcc 3.4 to gcc 4.0.1? I don't see anything in the release notes that matches the problem I'm getting, which looks like this (fuller error message attached below): no matching function for call to boost::smart_assert::Private::smart_assert_alloc<boost::smart_assert::assert_context_func>::destroy(std::pair<const int, boost::smart_assert::assert_context_func>*) candidates are: void __gnu_cxx::__mt_alloc_base<_Tp>::destroy(_Tp*) [with _Tp = boost::smart_assert::assert_context_func] (despite the namespace this is not an official boost library, but I hope this does not count as too off-topic) Darren g++ -Wall -Werror -g3 -DBOOST_SMART_ASSERT_MODE=1 -DBWIDTH=9 -DBHEIGHT=9 -Wno-reorder -c -o test_main.9.o test_main.cpp /usr/lib/gcc/i386-redhat-linux/4.0.1/../../../../include/c++/4.0.1/bits/stl_tree.h: In member function 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::destroy_node(std::_Rb_tree_node<_Val>*) [with _Key = int, _Val = std::pair<const int, boost::smart_assert::assert_context_func>, _KeyOfValue = std::_Select1st<std::pair<const int, boost::smart_assert::assert_context_func> >, _Compare = std::less<int>, _Alloc = boost::smart_assert::Private::smart_assert_alloc<boost::smart_assert::assert_context_func>]': /usr/lib/gcc/i386-redhat-linux/4.0.1/../../../../include/c++/4.0.1/bits/stl_tree.h:1096: instantiated from 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase(std::_Rb_tree_node<_Val>*) [with _Key = int, _Val = std::pair<const int, boost::smart_assert::assert_context_func>, _KeyOfValue = std::_Select1st<std::pair<const int, boost::smart_assert::assert_context_func> >, _Compare = std::less<int>, _Alloc = boost::smart_assert::Private::smart_assert_alloc<boost::smart_assert::assert_context_func>]' /usr/lib/gcc/i386-redhat-linux/4.0.1/../../../../include/c++/4.0.1/bits/stl_tree.h:570: instantiated from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with _Key = int, _Val = std::pair<const int, boost::smart_assert::assert_context_func>, _KeyOfValue = std::_Select1st<std::pair<const int, boost::smart_assert::assert_context_func> >, _Compare = std::less<int>, _Alloc = boost::smart_assert::Private::smart_assert_alloc<boost::smart_assert::assert_context_func>]' /usr/lib/gcc/i386-redhat-linux/4.0.1/../../../../include/c++/4.0.1/bits/stl_map.h:92: instantiated from here /usr/lib/gcc/i386-redhat-linux/4.0.1/../../../../include/c++/4.0.1/bits/stl_tree.h:389: error: no matching function for call to 'boost::smart_assert::Private::smart_assert_alloc<boost::smart_assert::assert_context_func>::destroy(std::pair<const int, boost::smart_assert::assert_context_func>*)' /usr/lib/gcc/i386-redhat-linux/4.0.1/../../../../include/c++/4.0.1/ext/mt_allocator.h:614: note: candidates are: void __gnu_cxx::__mt_alloc_base<_Tp>::destroy(_Tp*) [with _Tp = boost::smart_assert::assert_context_func] ... (then more of the same) ...

Has anyone had trouble with complex template code when moving from gcc 3.4 to gcc 4.0.1?
Actually "custom allocators" not "complex template code". It seems the smart assert library already had its custom allocator disabled for GNUC compilers, but g++ 4 doesn't like the replacement simple allocator either. I got it to compile by removing all uses of the custom allocator (John, I'll send you the patches tomorrow); I've not got as far as testing if asserts still assert correctly... Darren
participants (1)
-
Darren Cook