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
Schveighoffer wrote:
> @foo int z; // Error: cannot interpret foo(T)(T val) at compile
> time
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
mailing list