C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Default template parameter for uniform erasure
From: Giuseppe D'Angelo (giuseppe.dangelo_at_[hidden])
Date: 2020-10-20 19:25:57


Hi,

Il 21/10/20 02:04, Jason McKesson via Std-Discussion ha scritto:
> Ignoring the issue of compatibility, I'm not sure if removing all
> default-constructed elements of a list is common enough to warrant
> making this easier for people.

Well, the point is that it's not just the default constructed, it's
anything list-initialized without an explicit type:

  erase(vector_of_points, {4, 2});
  find(contact_list, {name, number});

and so on. Defaulting the template argument should be in principle
possible in all these cases, unlocking these use cases.

Thanks,

-- 
Giuseppe D'Angelo | giuseppe.dangelo_at_[hidden] | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups