Skip to content

Instantly share code, notes, and snippets.

@boki1
Created July 25, 2023 16:48
Show Gist options
  • Save boki1/ac24da6c8cdea2e3bba03b8445cf6c33 to your computer and use it in GitHub Desktop.
Save boki1/ac24da6c8cdea2e3bba03b8445cf6c33 to your computer and use it in GitHub Desktop.
Since c++23 supports attributes on lambdas, @lefticus came up with this real beautiful snippet of C++.
///
/// Valid syntax for whatever reason :D.
/// See https://www.youtube.com/watch?v=YlmxNJnone0 for details (if you dare).
///
int main() {
auto l = [][[]]([[]] auto) [[]] { return 42; };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment