On Sunday, 2 October 2022 at 18:24:51 UTC, Ali Çehreli wrote:
On 10/2/22 10:55, data pulverizer wrote:
> ```
> this(T)(ref return scope T original)
> if(is(T == RVector!(Type)))
> {
> //... code ...
> }
> ```
I've just tested. That is used only for explicit constructor
syntax:
auto b = RVector!int(a); // templatized
>
>
> But this now works:
>
>
> ```
> this(ref return scope RVector!(Type) original)
> {
> //... code ...
> }
> ```
That one works for both syntaxes:
auto b = RVector!int(a); // templatized
auto c = a; // non-templatized
Certainly confusing and potentially a bug... :/
It's a bug in the documentation.
https://issues.dlang.org/show_bug.cgi?id=23382
https://github.com/dlang/dlang.org/pull/3427