diff --git a/src/lib/diff/tree-mutator.hpp b/src/lib/diff/tree-mutator.hpp index 6f985c940..a6829c161 100644 --- a/src/lib/diff/tree-mutator.hpp +++ b/src/lib/diff/tree-mutator.hpp @@ -285,27 +285,10 @@ namespace diff{ namespace { // Mutator-Builder decorator components... - using lib::meta::_Fun; using std::forward; using std::move; - template - struct has_Sig - : std::is_same::Sig> - { }; - - /** verify the installed functors or lambdas expose the expected signature */ -#define ASSERT_VALID_SIGNATURE(_FUN_, _SIG_) \ - static_assert (has_Sig<_FUN_, _SIG_>::value, "Function " STRINGIFY(_FUN_) " unsuitable, expected signature: " STRINGIFY(_SIG_)); - - - - - - - - /** * Builder-DSL to create and configure a concrete TreeMutator * @remarks all generated follow-up builders are chained and diff --git a/src/lib/meta/function.hpp b/src/lib/meta/function.hpp index 548269b66..4f5617601 100644 --- a/src/lib/meta/function.hpp +++ b/src/lib/meta/function.hpp @@ -178,6 +178,31 @@ namespace meta{ + /** + * Meta-function to check that some _function like_ entity + * offers the expected signature + * @tparam SIG signature type (e.g. `float(int, bool)`) + * @tparam FUN anything _function like_ (class with function call operator + * or std::function instance, or λ instance or language function + * reference or function pointer + */ + template + struct has_Sig + : std::is_same::Sig> + { }; + + /** + * Macro for a compile-time check to verify the given + * generic functors or lambdas expose some expected signature. + * @remark typically used when configuring a template with custom adapters. + */ +#define ASSERT_VALID_SIGNATURE(_FUN_, _SIG_) \ + static_assert (lib::meta::has_Sig<_FUN_, _SIG_>::value, \ + "Function " STRINGIFY(_FUN_) " unsuitable, expected signature: " STRINGIFY(_SIG_)); + + + + diff --git a/src/lib/split-splice.hpp b/src/lib/split-splice.hpp index 6ccc8700b..2c8dd8bc6 100644 --- a/src/lib/split-splice.hpp +++ b/src/lib/split-splice.hpp @@ -32,9 +32,8 @@ #define LIB_SPLIT_SPLICE_H #include "lib/error.hpp" -//#include "steam/mobject/builder/fixture-change-detector.hpp" ///////////TODO -#include "lib/time/timevalue.hpp" #include "lib/meta/function.hpp" +#include "lib/time/timevalue.hpp" #include "lib/nocopy.hpp" #include @@ -45,19 +44,7 @@ namespace lib { namespace error = lumiera::error; - namespace splitsplice {// Implementation of Split-Splice algorithm - - using lib::meta::_Fun; - - template - struct has_Sig - : std::is_same::Sig> - { }; - - /** verify the installed functors or lambdas expose the expected signature */ -#define ASSERT_VALID_SIGNATURE(_FUN_, _SIG_) \ - static_assert (has_Sig<_FUN_, _SIG_>::value, "Function " STRINGIFY(_FUN_) " unsuitable, expected signature: " STRINGIFY(_SIG_)); - + namespace splitsplice {/// Implementation of [»SplitSplice« algorithm](\ref splite-splice.cpp) /**