This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] PR 8761 and 7076, take 2
On Wed, Jan 22, 2003 at 04:13:49PM +0100, Gabriel Dos Reis wrote:
> Nathan Myers <ncm-nospam@cantrip.org> writes:
> | On Wed, Jan 22, 2003 at 01:33:19AM -0600, Benjamin Kosnik wrote:
> | > Nathan Myers <ncm-nospam@cantrip.org> wrote:
> | >
> | > >> + // NB: Of the two parameters, _CharT can be deduced from the
> | > >> + // function arguments. The other (_Traits) has to be explicitly specified.
> | > >> +
> | > >> + template<typename _CharT, typename _Traits>
> | > >> + struct __pad [... ]
> | > >
> | > >I don't see how arguments to a struct template can be deduced.
> | > >A better comment would explain why __pad is a struct at all.
>
> I seem to recall that we have been through this in the past -- when
> __pad became a struct --- that what you're suggesting doesn't scale.
> The point being (if I recall correctly) that we wanted to partially
> specialize the function (no, we didn't want an overload), so we had no
> choice.
That sounds plausible. How about this for the comment, then:
// __pad is a struct, rather than a function, so it can be
// partially-specialized.
Nathan Myers
ncm-nospam@cantrip.org