From 35dceeb5bd864973ea1f21ed1c7db36c0a2c579c Mon Sep 17 00:00:00 2001 From: klaus triendl Date: Fri, 24 Nov 2023 21:57:52 +0200 Subject: [PATCH] Simplified code for quoting a freestanding function as a scalar --- dev/function.h | 12 +----------- include/sqlite_orm/sqlite_orm.h | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/dev/function.h b/dev/function.h index 697ae94b8..5bc230af4 100644 --- a/dev/function.h +++ b/dev/function.h @@ -411,17 +411,7 @@ namespace sqlite_orm { using cstring_literal::cstring_literal; /* - * From a freestanding function. - */ - template - requires(std::is_function_v>) - [[nodiscard]] consteval auto quote(F callable) const { - using Sig = function_signature_type_t; - return quoted_scalar_function{this->cstr, std::move(callable)}; - } - - /* - * From an overloaded freestanding function. + * From a freestanding function, possibly overloaded. */ template [[nodiscard]] consteval auto quote(F* callable) const { diff --git a/include/sqlite_orm/sqlite_orm.h b/include/sqlite_orm/sqlite_orm.h index 734bd1d7f..089babca4 100644 --- a/include/sqlite_orm/sqlite_orm.h +++ b/include/sqlite_orm/sqlite_orm.h @@ -11399,17 +11399,7 @@ namespace sqlite_orm { using cstring_literal::cstring_literal; /* - * From a freestanding function. - */ - template - requires(std::is_function_v>) - [[nodiscard]] consteval auto quote(F callable) const { - using Sig = function_signature_type_t; - return quoted_scalar_function{this->cstr, std::move(callable)}; - } - - /* - * From an overloaded freestanding function. + * From a freestanding function, possibly overloaded. */ template [[nodiscard]] consteval auto quote(F* callable) const {