C++ Logo

std-proposals

Advanced search

is_deletable type traits

From: Zoe Carver <z.zoelec2_at_[hidden]>
Date: Sun, 2 Jun 2019 10:00:05 -0700
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.

Received on 2019-06-02 12:02:03