diff --git a/src/vtab_module.hh b/src/vtab_module.hh index 603710d8..af318e9b 100644 --- a/src/vtab_module.hh +++ b/src/vtab_module.hh @@ -336,10 +336,6 @@ struct sqlite_func_adapter { constexpr static size_t OPT_COUNT = optional_counter::value; constexpr static size_t VAR_COUNT = variadic_counter::value; constexpr static size_t REQ_COUNT = sizeof...(Args) - OPT_COUNT - VAR_COUNT; - constexpr static bool IS_NULLABLE[] = {vtab_types::is_nullable::value ... }; - constexpr static bool IS_SQLITE3_VALUE[] = { - std::is_same::value ... - }; template static void func2(sqlite3_context *context, @@ -366,6 +362,11 @@ struct sqlite_func_adapter { static void func1(sqlite3_context *context, int argc, sqlite3_value **argv) { + const static bool IS_NULLABLE[] = {vtab_types::is_nullable::value ... }; + const static bool IS_SQLITE3_VALUE[] = { + std::is_same::value ... + }; + if ((size_t) argc < REQ_COUNT && VAR_COUNT == 0) { const struct FuncDef *fd = (const FuncDef *) sqlite3_user_data(context); char buffer[128];