We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7133a4 commit 7624ccdCopy full SHA for 7624ccd
spec/template.dd
@@ -803,14 +803,18 @@ $(H4 $(LNAME2 typed_alias_op, Typed Alias Parameters))
803
$(P Alias parameters can also be typed.
804
These parameters will accept symbols of that type:)
805
806
+ $(SPEC_RUNNABLE_EXAMPLE_COMPILE
807
------
- template Foo(alias int x) { }
808
- int x;
809
- float f;
+ template Foo(alias int p) { alias a = p; }
810
811
- Foo!x; // ok
812
- Foo!f; // fails to instantiate
+ int i = 0;
+ Foo!i.a++; // ok
+ assert(i == 1);
813
+
814
+ float f;
815
+ //Foo!f; // fails to instantiate
816
817
+ )
818
819
$(H4 $(LNAME2 alias_parameter_specialization, Specialization))
820
0 commit comments