C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] is_value_constructible
From: Jason McKesson (jmckesson_at_[hidden])
Date: 2021-05-02 16:33:41


On Sun, May 2, 2021 at 1:51 PM Edward Catmur via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On Sun, 2 May 2021 at 17:56, Arthur O'Dwyer via Std-Proposals <std-proposals_at_[hidden]> wrote:
>>
>> However, I don't see any need to standardize is_same_uncvref; it seems trivial to write by hand.
>> Notice I could also have done
>> requires (not same_as<remove_cvref_t<T>, AlphableRef>)
>> which is almost as short.
>
>
> This problem often comes up when writing variadic forwarding constructors, for which writing the test is a bit of a pain.

I guess my confusion is why you want to *prevent* a "variadic
forwarding constructor" from performing a copy/move. If you're worried
about the forwarding constructor interfering with the actual copy/move
constructor for the main type, it won't: templates are *never*
considered copy/move constructors.


STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups