V3 static data in classes vs AIX
Benjamin Kosnik
bkoz@redhat.com
Wed Jun 6 18:41:00 GMT 2001
> string-inst.o includes the symbol:
> 25412 T std::string::_Rep::_S_max_size
>
> but I am getting errors for 21_strings/capacity.cc:
> std::basic_string<A<B>, std::char_traits<A <B> >, std::allocator<A<B> > >::_Rep::_S_max_size
Hmm.
include/bits/basic_string.tcc has:
template<typename _CharT, typename _Traits, typename _Alloc>
const typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
_Rep::_S_max_size = (((npos - sizeof(_Rep))/sizeof(_CharT)) - 1) / 4;
So it's defined, or should be. Maybe implicit instantiations of class
templates doesn't instantiate nested class static data on AIX?
-benjamin
More information about the Libstdc++
mailing list