From c330b268a58c0ed13b6cf568725f960cbc53bbf6 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Wed, 21 Feb 2024 16:32:44 -0500 Subject: [PATCH] operators --- libs/BLT | 2 +- tests/src/tests.cpp | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/libs/BLT b/libs/BLT index 0b6b6ae..392c327 160000 --- a/libs/BLT +++ b/libs/BLT @@ -1 +1 @@ -Subproject commit 0b6b6aed9b1fa2428bd665a72149f21f9e0e5d0d +Subproject commit 392c32751da3f23644990581fda9fe59ec603de2 diff --git a/tests/src/tests.cpp b/tests/src/tests.cpp index 69f685b..157303e 100644 --- a/tests/src/tests.cpp +++ b/tests/src/tests.cpp @@ -135,21 +135,29 @@ namespace fb }; - class flat_tree { }; - struct node_container + template + struct operator_t { - [[nodiscard]] constexpr arg_count_t argCount() const - { return 0; } - - [[nodiscard]] static inline constexpr arg_count_t determine_max_argc() - { - return 2; - } + private: + arg_count_t argc; + std::function)> func; + blt::vector> allowed_inputs; + public: + operator_t(arg_count_t argc, std::function)> func): argc(argc), func(std::move(func)) + {} + + [[nodiscard]] constexpr arg_count_t argCount() const + { return argc; } + + [[nodiscard]] constexpr std::function)> function() const + { return func; } + + }; template