C++ Logo

std-proposals

Advanced search

is_value_constructible

From: Bjorn Reese <breese_at_[hidden]>
Date: Sun, 2 May 2021 18:35:12 +0200
I am considering proposing the addition of type traits to check if a
type is constructible from arguments except if the argument are the
copy/move constructors of the type.

The purpose is to have a common way of writing a condition for
templated constructors:

   struct alpha {
     alpha(const alpha&);
     template <typename T>
       requires(condition-that-excludes-copy-constructor)
     alpha(T&&);
   };

I have attached a draft of the proposal and would like to hear your
feedback.

Received on 2021-05-02 11:35:26