uda pattern foo and foo(val)
Adam D. Ruppe
destructionator at gmail.com
Wed Sep 23 01:57:08 UTC 2020
On Wednesday, 23 September 2020 at 01:45:46 UTC, Steven
> @foo int z; // Error: cannot interpret foo(T)(T val) at compile
Where do you get that error? Is it from phobos' thing? cuz I
copy/pasted your code and it compiled.
You can also just use a struct as the uda if your detection
function checks for both the type and a value of the type, so it
really depends on which search method you using.
More information about the Digitalmars-d-learn