Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save NocturnDragon/caf4d4a8363279923782729c103f1912 to your computer and use it in GitHub Desktop.
Save NocturnDragon/caf4d4a8363279923782729c103f1912 to your computer and use it in GitHub Desktop.
char * stringify~for_int (int x);
char * stringify~for_char (char c);
// The compiler can infer the suffix to use
stringify (1); // Same as stringify~for_int (1)
char * (*ptr)(int x) = stringify~for_int (1); // It can be given explicitly to get an exact function
//SOURCE: https://www.reddit.com/r/cpp/comments/9wjfi6/c2x_the_next_real_revision_of_the_c_standard/e9lnq00/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment