From 94bd73d942252b61d4667451b73ac552fc803bb4 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Sun, 2 Jun 2024 22:13:20 -0400 Subject: [PATCH] silly --- CMakeLists.txt | 2 +- include/blt/gp/program.h | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) 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 + { + + }; + }