On 1/22/20 11:19 AM, Patrick Palka wrote:
On Tue, 21 Jan 2020, Jason Merrill wrote:
On 1/20/20 8:06 PM, Patrick Palka wrote:
The leak in get_mapped_args is due to auto_vec not properly supporting
destructible elements, in that auto_vec's destructor doesn't call the
destructors of its elements.
Hmm, perhaps vec should static_assert __is_trivial(T) when supported.
Unfortunately this would break other seemingly well-behaved users of vec
in which T doesn't have a trivial default constructor. Relaxing the
condition to __has_trivial_copy(T) && __has_trivial_destructor(T) seems
to be fine though.
Sure, that makes sense; grow does try to default-construct elements.
Jason