C++ Logo

std-discussion

Advanced search

Re: add_rvalue_reference

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Sat, 03 Jun 2023 22:11:27 +0300
 
Oh, I am sorry. I read referenceable type as referenced type.:)
 
With best regards,
(Vlad from Moscow)
 
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com
 
  
>Суббота, 3 июня 2023, 14:28 +03:00 от Daniel Krügler <daniel.kruegler_at_[hidden]>:
>
>Am Sa., 3. Juni 2023 um 13:23 Uhr schrieb Vladimir Grigoriev via
>Std-Discussion < std-discussion_at_[hidden] >:
>>
>> It seems there is a typo in the table «Table 53: Reference modifications «.
>>
>> There is written
>>
>> «If T names a referenceable type then the member typedef type names T&&; otherwise, type names T.»
>>
>> Instead should it be
>>
>> «If T names a referenceable type then the member typedef type names T; otherwise, type names T&&.»?
>No.
>
>The type trait will *add* an rvalue reference, but it can only do so,
>if the type is actually referencable. For example, void is not a
>referencable type, so you cannot form void&&, therefore the result is
>still void.
>
>Thanks,
>
>- Daniel
 

Received on 2023-06-03 19:11:36