Skip to content

Instantly share code, notes, and snippets.

@4e1e0603
Created July 15, 2016 19:35
Show Gist options
  • Save 4e1e0603/c941893da9228110887b79c8e5085d0a to your computer and use it in GitHub Desktop.
Save 4e1e0603/c941893da9228110887b79c8e5085d0a to your computer and use it in GitHub Desktop.
C++/SQL variadic macro
#include <string>
#include <iostream>
#define SQL(...) #__VA_ARGS__
int main()
{
std::string query(SQL(
SELECT
*
FROM
person
WHERE
id = 1
));
std::cout << query << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment