Created
September 19, 2017 11:14
-
-
Save njlr/ea3e7dfe47ffc9e97dc3e2fdcb128810 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
struct Functor { | |
// The context, or capture | |
// For example, an int and an unsigned | |
int i; | |
unsigned N; | |
// The lambda | |
int operator() (int j) const { | |
// For example, a small math function | |
return i * j + N; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment