svn commit: r204537 - in projects/clangbsd/contrib/libstdc++:
include/ext src
Roman Divacky
rdivacky at freebsd.org
Tue Mar 2 08:23:22 UTC 2010
<disclaimer>
I am not a C++ expert but these changes were suggested by a member
of C++ committee. ie. I trust them :)
On Mon, Mar 01, 2010 at 05:44:45PM -0500, John Baldwin wrote:
> On Monday 01 March 2010 4:30:11 pm Roman Divacky wrote:
> > Author: rdivacky
> > Date: Mon Mar 1 21:30:11 2010
> > New Revision: 204537
> > URL: http://svn.freebsd.org/changeset/base/204537
> >
> > Log:
> > Make this a little more like C++. Clang++ can grok all libstdc++
> > now.
> >
> > Modified:
> > projects/clangbsd/contrib/libstdc++/include/ext/ropeimpl.h
> > projects/clangbsd/contrib/libstdc++/src/locale-inst.cc
> >
> > Modified: projects/clangbsd/contrib/libstdc++/include/ext/ropeimpl.h
> >
> ==============================================================================
> > --- projects/clangbsd/contrib/libstdc++/include/ext/ropeimpl.h Mon Mar 1
> 21:04:10 2010 (r204536)
> > +++ projects/clangbsd/contrib/libstdc++/include/ext/ropeimpl.h Mon Mar 1
> 21:30:11 2010 (r204537)
> > @@ -382,7 +382,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
> > {
> > _Rope_RopeLeaf<_CharT, _Alloc>* __l
> > = (_Rope_RopeLeaf<_CharT, _Alloc>*)this;
> > - __l->_Rope_RopeLeaf<_CharT, _Alloc>::~_Rope_RopeLeaf();
> > + __l->template _Rope_RopeLeaf<_CharT, _Alloc>::~_Rope_RopeLeaf();
> > _L_deallocate(__l, 1);
> > break;
> > }
>
> Hmm, this hurts my brain to have 'template ' in the middle of a dereference.
> I also don't see why it should be needed.
C++ seems to work this way... it's ugly yes, but correct
> > Modified: projects/clangbsd/contrib/libstdc++/src/locale-inst.cc
> >
> ==============================================================================
> > --- projects/clangbsd/contrib/libstdc++/src/locale-inst.cc Mon Mar 1
> 21:04:10 2010 (r204536)
> > +++ projects/clangbsd/contrib/libstdc++/src/locale-inst.cc Mon Mar 1
> 21:30:11 2010 (r204537)
> > @@ -180,11 +180,11 @@ _GLIBCXX_END_LDBL_NAMESPACE
> > template class messages_byname<C>;
> >
> > // ctype
> > - inline template class __ctype_abstract_base<C>;
> > + template class __ctype_abstract_base<C>;
> > template class ctype_byname<C>;
> >
> > // codecvt
> > - inline template class __codecvt_abstract_base<C, char, mbstate_t>;
> > + template class __codecvt_abstract_base<C, char, mbstate_t>;
> > template class codecvt_byname<C, char, mbstate_t>;
>
> Perhaps try moving the 'template' before the 'inline'? Randomly dropping
> 'inline' isn't really ideal I think.
the inline there is completely superfluous - you cant have an inline class instantiation
More information about the svn-src-projects
mailing list