diff --git a/CMakeLists.txt b/CMakeLists.txt index bcf5b9a..255cb20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(blt-gp VERSION 0.0.4) +project(blt-gp VERSION 0.0.5) option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF) option(ENABLE_UBSAN "Enable the ub sanitizer" OFF) diff --git a/include/blt/gp/program.h b/include/blt/gp/program.h index b19a492..de1b584 100644 --- a/include/blt/gp/program.h +++ b/include/blt/gp/program.h @@ -30,11 +30,11 @@ namespace blt::gp { }; - template + template class operation { public: - using function_t = std::function)>; + using function_t = std::function; operation(const operation& copy) = default; @@ -48,19 +48,35 @@ namespace blt::gp func = functor; } else { - func = [&functor](blt::span args) { - return functor(args); + func = [&functor](Args... args) { + return functor(args...); }; } } explicit operation(function_t&& functor): func(std::move(functor)) {} + + inline Return operator()(Args... args) + { + return func(args...); + } + + inline Return operator()(blt::span args) + { + + } private: function_t func; }; + template + class operations + { + + }; + }