template<typename T, size_t N = 1>
void ReadSize(T &buffer){
std::cout << sizeof(T) * N << std::endl;
}
int main() {
std::cout << "single var!" << std::endl; //should be 4
int value = 10;
ReadSize(value);
std::cout << "array!" << std::endl; //should be 40
int values[10];
ReadSize(values);
return 0;
}
if constexpr (std::is_same_v<T, real_t>)
foo(new_shared<Param_pge_real>());
else
foo(new_shared<Param_pge_int>());
}
template <typename T>
void foo(shared_ptr<T> param) {
param->description = desc;
param->title = title;
param->value = val;
param->speed_step = speedstep;
g_pge_params.push_back(std::move(param));
}