Red Hat Bugzilla – Bug 411871
boost::detail::is_convertible_impl fails to compile with a template argument that is in anonymous namespace
Last modified: 2007-12-12 15:24:17 EST
Description of problem:
The attached code fails to compile with gcc-4.1.2-35 and boost-1.34.1-5.fc8 with
/usr/include/boost/type_traits/is_convertible.hpp:128: error: static data member
‘boost::detail::is_convertible_basic_impl<<unnamed>::baz&, int>::_m_from’ used,
but not defined
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. g++ test.cxx
I'm confused as to why in the example the non-anonymous foo works, while the
anonymous baz fails, and wildly unsure is this is a g++ problem or a boost one.
Or if the situation is just that now "you cannot use boost type_traits on
anonymous namespace classes". There are about 10 or 12 places in OOo which fail
to compile at the moment. The workaround is easy in that removing the anonymous
namespace from the OOo classes works, but it's not something I really want to
force on upstream if at all avoidable.
Created attachment 278231 [details]
This is a gcc bug, see http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00182.html
for a fix. I'm waiting for review of that patch now...
The PR34094 diagnostics has been reverted in 4.1.2-36 (and on the trunk too).