centralized performance resources
This commit is contained in:
commit
50b15a1522
63 changed files with 328466 additions and 0 deletions
14
perf-cpp/scripts/consteval.cc
Normal file
14
perf-cpp/scripts/consteval.cc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <iostream>
|
||||
|
||||
consteval int foo(int x) {
|
||||
if (x <= 1) return x;
|
||||
return foo(x - 1) + foo(x - 2);
|
||||
}
|
||||
|
||||
int main() {
|
||||
constexpr int x = foo(3);
|
||||
|
||||
static_assert(x != foo(4));
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue