Skip to content

Instantly share code, notes, and snippets.

@JakobOvrum
Created May 10, 2012 23:46
Show Gist options
  • Save JakobOvrum/2656623 to your computer and use it in GitHub Desktop.
Save JakobOvrum/2656623 to your computer and use it in GitHub Desktop.
Workaround for type template identification with variadic template arguments
struct S(T...){}
// void foo(T : S!U, U...)(T s) {} // DMD ICE
void foo(T)(T s) if(is(T Unused == S!U, U...)) {}
void main()
{
S!int s;
foo(s);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment