Skip to content

Instantly share code, notes, and snippets.

@Marenz
Created January 29, 2017 14:42
Show Gist options
  • Save Marenz/1b48e0928e62ef3d94ae38a74f586d0a to your computer and use it in GitHub Desktop.
Save Marenz/1b48e0928e62ef3d94ae38a74f586d0a to your computer and use it in GitHub Desktop.
import std.algorithm;
alias filterZeros2 = filter!(a=>a!=0);
class C
{
alias filterZeros = filter!(a=>a!=0);
size_t doCount ( ) const
{
return filterZeros([1,2,3]).count; // fails
return filterZeros2([1,2,3]).count; // works
}
}
void main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment