1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream> #ifndef N #define N 42 #endif template <int n> void print() { std::cout << n << std::endl; } int main() { print<N>(); return 0; }