Created
January 29, 2017 14:42
-
-
Save Marenz/1b48e0928e62ef3d94ae38a74f586d0a to your computer and use it in GitHub Desktop.
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.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