operators

main
Brett 2024-02-21 16:32:44 -05:00
parent 6c14bbc941
commit c330b268a5
2 changed files with 18 additions and 10 deletions

@ -1 +1 @@
Subproject commit 0b6b6aed9b1fa2428bd665a72149f21f9e0e5d0d Subproject commit 392c32751da3f23644990581fda9fe59ec603de2

View File

@ -135,21 +135,29 @@ namespace fb
}; };
class flat_tree class flat_tree
{ {
}; };
struct node_container template<typename ARG_TYPE>
struct operator_t
{ {
[[nodiscard]] constexpr arg_count_t argCount() const private:
{ return 0; } arg_count_t argc;
std::function<ARG_TYPE(blt::span<ARG_TYPE>)> func;
[[nodiscard]] static inline constexpr arg_count_t determine_max_argc() blt::vector<operator_t<ARG_TYPE>> allowed_inputs;
{ public:
return 2; operator_t(arg_count_t argc, std::function<ARG_TYPE(blt::span<ARG_TYPE>)> func): argc(argc), func(std::move(func))
} {}
[[nodiscard]] constexpr arg_count_t argCount() const
{ return argc; }
[[nodiscard]] constexpr std::function<ARG_TYPE(blt::span<ARG_TYPE>)> function() const
{ return func; }
}; };
template<typename NODE_CONTAINER, typename ALLOC> template<typename NODE_CONTAINER, typename ALLOC>