Bug 84916 - Tweaks to template type elision
Summary: Tweaks to template type elision
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: ---
Assignee: David Malcolm
URL:
Keywords: deferred, diagnostic
Depends on:
Blocks:
 
Reported: 2018-03-16 21:46 UTC by David Malcolm
Modified: 2023-07-07 07:52 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-06-17 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Malcolm 2018-03-16 21:46:51 UTC
In https://www.reddit.com/r/programming/comments/84oizv/usability_improvements_in_gcc_8/dvrdyhv/
Reddit user "Liorithiel" pointed out:

> Have you considered performing elision conditionally on the length on the
> elided part? I see the benefits of changing, let say,

   std::map<some<long, and, nested<type>>, std::string>

> into

   std::map<[...], std::string>,

> but for me,

  std::map<int, int>

> is clearer than

  std::map<[...], int>.

(see the other comments downthread from thread).

I'm filing this reminder to take a look at tweaking this for gcc 9.

Maybe only elide common items if there's "more than one thing" e.g. if it's a template itself, or is multiple args?
Comment 1 David Malcolm 2018-03-16 21:49:27 UTC
Or just textual length? (perhaps with a param)?
Comment 2 Vittorio Romeo 2018-03-16 22:59:30 UTC
This might be of interest as well:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71167
Comment 3 Eric Gallager 2018-06-17 20:25:54 UTC
(In reply to David Malcolm from comment #0)
> In
> https://www.reddit.com/r/programming/comments/84oizv/usability_improvements_in_gcc_8/dvrdyhv/
> Reddit user "Liorithiel" pointed out:
> 
> > Have you considered performing elision conditionally on the length on the
> > elided part? I see the benefits of changing, let say,
> 
>    std::map<some<long, and, nested<type>>, std::string>
> 
> > into
> 
>    std::map<[...], std::string>,
> 
> > but for me,
> 
>   std::map<int, int>
> 
> > is clearer than
> 
>   std::map<[...], int>.
> 
> (see the other comments downthread from thread).
> 
> I'm filing this reminder to take a look at tweaking this for gcc 9.

Trunk is on gcc 9 now. Confirming since this originally came from someone else, and changing status to ASSIGNED since you're the assignee.

> 
> Maybe only elide common items if there's "more than one thing" e.g. if it's
> a template itself, or is multiple args?
Comment 4 David Malcolm 2019-02-15 21:15:40 UTC
I have a patch for this, queuing for gcc 10 stage 1.
Comment 5 Eric Gallager 2019-05-15 06:27:10 UTC
(In reply to David Malcolm from comment #4)
> I have a patch for this, queuing for gcc 10 stage 1.

It's gcc 10 stage 1
Comment 6 Jakub Jelinek 2020-05-07 11:56:27 UTC
GCC 10.1 has been released.
Comment 7 Richard Biener 2020-07-23 06:51:50 UTC
GCC 10.2 is released, adjusting target milestone.
Comment 8 Richard Biener 2021-04-08 12:02:18 UTC
GCC 10.3 is being released, retargeting bugs to GCC 10.4.
Comment 9 Jakub Jelinek 2022-06-28 10:34:55 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.