Created
January 10, 2010 22:10
-
-
Save minad/273817 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g++ -o test test.cpp | |
objdump -S test | grep 0x375f00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<int i> | |
struct fac { static const int result = fac<i - 1>::result * i; }; | |
template<> | |
struct fac<0> { static const int result = 1; }; | |
int main() { | |
return fac<10>::result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment