This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/14912 (omitting default template args in error messages)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 26 Jun 2009 17:46:25 -0700
- Subject: Re: C++ PATCH for c++/14912 (omitting default template args in error messages)
- References: <49D90672.9040603@redhat.com>
On Sun, Apr 5, 2009 at 12:28 PM, Jason Merrill<jason@redhat.com> wrote:
> This patch has been kicking around for years, without ever actually making
> it into G++. ?I'm not sure why, exactly; I guess Giovanni lost interest in
> it due to controversy over future directions. ?The current patch omits
> defaulted template arguments when dumping a class template specialization,
> i.e. vector<int> rather than vector<int, allocator<int> >. ?It does not
> remove defaulted template arguments from the pretty-printing of function
> template specializations, which will still look like (say)
>
> void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_InputIterator,
> _InputIterator, std::__false_type)
> [with _InputIterator = double, _Tp = std::vector<std::vector<int> >,
> ?_Alloc = std::allocator<std::vector<std::vector<int> > >]
>
> Because _Alloc shows up in the template signature, I think we need to list
> what that name means even if it's defaulted. ?But because dumping the
> binding itself uses the normal type mechanisms, we omit the default
> arguments there so we avoid the combinatorial explosion problem that we
> previously got with nested containers.
>
> Tested x86_64-pc-linux-gnu, applied to trunk.
>
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40274
--
H.J.