ClickHouse/dbms/Common/tests/simple_cache.cpp
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

23 lines
494 B
C++

#include <iostream>
#include <common/SimpleCache.h>
static int func(int x, int y)
{
std::cerr << x << " + " << y << "\n";
return x + y;
}
int main(int, char **)
{
SimpleCache<decltype(func), &func> func_cached;
std::cerr << func_cached(1, 2) << "\n";
std::cerr << func_cached(1, 2) << "\n";
std::cerr << func_cached(1, 2) << "\n";
std::cerr << func_cached(3, 4) << "\n";
std::cerr << func_cached(3, 4) << "\n";
std::cerr << func_cached(3, 4) << "\n";
}