Created
April 9, 2020 00:34
-
-
Save JonathanILevi/bf679315b4f60351f12f09a8b57524b4 to your computer and use it in GitHub Desktop.
Template bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void aFoo() { | |
} | |
void aBar() { | |
} | |
alias vsh1(string name) = (){}; | |
template vsh1(alias foo) { | |
auto vsh1(Parameters!foo args) { | |
return; | |
} | |
} | |
alias vsh2(string name) = (){}; | |
template vsh2(alias foo, alias bar) { | |
auto vsh2(Parameters!foo args) { | |
return; | |
} | |
} | |
void main() { | |
vsh1!"a"(); | |
vsh2!"a"(); | |
} |
adamdruppe
commented
Apr 9, 2020
template vshCreate(T...)
if ((T.length==1 && is(typeof(T[0])==string)) || (T.length==2 && isCallable!(T[0]) && isCallable!(T[1]))
{
static if (T.length==1) {
}
static if (T.length==2) {
}
static assert(false);
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment