Last active
August 29, 2015 14:00
-
-
Save Elv13/11265079 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
#include <stdio.h> | |
#define LAM(type,def,ret) [] () -> type { \ | |
static type bar = def; \ | |
return ret + bar; }\ | |
class A { | |
public: | |
constexpr static const auto method = LAM(const int,2,12); | |
int x; | |
}; | |
int main() { | |
A a; | |
a.x = 1337; | |
//printf("Uncomment me %d\n",a.method()); | |
return a.x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment