C++ Logo

std-proposals

Advanced search

Re: is_deletable type traits

From: Nicolas Lesser <blitzrakete_at_[hidden]>
Date: Sun, 02 Jun 2019 21:17:45 +0200
Zoe Carver via Std-Proposals wrote:
> Before submitting a proposal for the following type traits, I wanted to get
> the communities opinion. What are your thoughts on adding the following to
> the standard library?
>
>
> 1. is_deletable: if the expression "delete decltype<T>()" is
> well-formed, provides
> the member constant value equal to true. Otherwise, value is false.
>
>
> 2. is_array_deletable: if the expression "delete[] decltype<T>()" is
> well-formed, provides the member constant value equal to true. Otherwise,
> value is false.
>
>
> This should be a small feature with little-no impact. I have a sample
> implementation if that would be helpful.

I don't see the difference between is_deletable and is_array_deletable, since they both have the same restrictions on their arguments.
This could possibly be confusing since people might expect the latter to be false if you don't pass in an array.

-- 
- Nicolas

Received on 2019-06-02 14:19:36