Instantly share code, notes, and snippets.

@thiagomg /lambda.cpp
Last active Aug 30, 2015

Embed
What would you like to do?
Lambda - Functor
Functor:
template<typename T>
class F {
T &_b;
public:
F(T &b) : _b(b) { }
auto operator()(T v) {
return v * _b;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment