getting template overloads for a function template
Steven Schveighoffer
schveiguy at gmail.com
Sat Jan 23 18:00:00 UTC 2021
Let's say I have a function template:
template foo(T)
{
void foo(T t) {}
}
I want to get the overloads of foo based on the instantiation foo!int,
let's say.
But __traits(getOverloads, foo!int, "foo") doesn't work. Instead, it
thinks I want:
__traits(getOverloads, foo!int(), "foo")
If I change the function name to not be eponymous, it works:
template foo(T)
{
void bar(T t) {}
}
__traits(getOverloads, foo!int, "bar") // ok!
Is there a trick to disable the property rewrite? I tried alias, no dice.
-Steve
More information about the Digitalmars-d
mailing list