// Meta-function | |
template <int a, int b> | |
struct add_struct | |
{ | |
enum { value = a + b }; | |
}; | |
// Compute the value at compile time | |
add_struct<1, 2>::value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment