On Sunday, 11 December 2022 at 16:48:57 UTC, Ali Çehreli wrote:
However, the situation has changed in D: It has been possible
to pass rvalues by reference through the magic of 'in'
parameters. This currently requires the -preview=in compiler
switch, which makes 'in' parameters imply 'const
On Sunday, 11 December 2022 at 04:36:45 UTC, thebluepandabear
wrote:
Hello,
I am not really understanding why rvalues cannot be passed to a
'ref' parameter, the explanation in the book about D I am
reading was not clear:
"The main reason for this limitation is the fact that a
function
On 12/11/22 01:25, zjh wrote:
> On Sunday, 11 December 2022 at 04:36:45 UTC, thebluepandabear wrote:
>
>> "The main reason for this limitation is the fact that a function
>> taking a ref
>> parameter can hold on to that reference for later use, at a time when
>> the rvalue
>> would not be
On Sunday, 11 December 2022 at 04:36:45 UTC, thebluepandabear
wrote:
"The main reason for this limitation is the fact that a
function taking a ref
parameter can hold on to that reference for later use, at a
time when the rvalue
would not be available."
I only know that `rvalue` is a
Hello,
I am not really understanding why rvalues cannot be passed to a
'ref' parameter, the explanation in the book about D I am reading
was not clear:
"The main reason for this limitation is the fact that a function
taking a ref
parameter can hold on to that reference for later use, at a