Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Template Meta Programming
//clang 3.7.0 #include <iostream> #include <cassert> template<int i> long int factorial() { return i * factorial<i-1>(); } template<> long int factorial<0>() { return 1; } int main() { constexpr int N = 8; assert(factorial<N>() == 40320); }
run
|
edit
|
history
|
help
0
Access to temporary object
<string> No indirect include of <errno.h>
set/map equal_range bug in libc++
HerbSutter-Virtuality
Pascals Triangle
regimeketopdfb
for_each_argument
NaN inside set
A
Recursive Enumeration Example