template ctor overload Segmentation fault

Imperatorn johan_forsberg_86 at hotmail.com
Sun Dec 12 18:32:28 UTC 2021


On Sunday, 12 December 2021 at 11:57:43 UTC, vit wrote:
> Hello, why does this code fail to compile?
>
> ```d
> struct Foo(T){
>     this(Rhs, this This)(scope Rhs rhs){
>     }
>
>     this(ref scope typeof(this) rhs){
>     }
> }
>
>
> struct Bar{
> 	Foo!int foo;
> }
>
> void main(){
> }
> ```
>
> error: Segmentation fault (core dumped)

What are you trying to accomplish?


More information about the Digitalmars-d-learn mailing list