[GCC-XML] Default parameter values in member functions of templated classes.
Thomas Menguy
thomas.menguy at gmail.com
Mon Feb 25 04:33:28 EST 2008
hum, right, I read your mail too fast.
I too not understand why npos seems to be specialized here....perhaps
_CharT is an alias to wchar_t, same for _Traits and _Alloc????
(a typedef, a define or any other thing?)
Thomas
On Mon, Feb 25, 2008 at 9:52 AM, Bryan Ischo <bji-gccxml at ischo.com> wrote:
> Thomas Menguy wrote:
> > Hi Bryan,
> >
> > check the stl standared: http://www.sgi.com/tech/stl/basic_string.html
> >
> >
> >
> > static const size_type npos basic_string The largest possible value
> > of type size_type. That is, size_type(-1).
> >
> > => npos is a constant defined by basic_string, and now look at the
> > default constructor:
> > basic_string(const basic_string& s, size_type pos = 0, size_type n = npos)
> >
> >
> > so yes, for me have default equal to this is normal.... look at npos
> > in your xml and you will see its definition.
> >
> > Hope this helps
> > Thomas
> >
>
> Yes, but since the class which contains the constructor which has the
> argument which has the default is:
>
> basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
>
> Then shouldn't npos be identified as:
>
> std::basic_string<wchar_t, td::char_traits<wchar_t>, std::allocator<wchar_t>
> >::npos
>
> instead of :
>
> std::basic_string<_CharT, _Traits, _Alloc>::npos
>
> ???
>
> In other words, shouldn't the type of npos be identified by the actual template parameter values used in declaring the template instance in which npos is being referenced, instead of by the variable names used in the template definition itself?
>
> Thanks,
> Bryan
>
>
>
>
More information about the gccxml
mailing list