From fc2378236985830cd34c93dd95f289b4a72ee845 Mon Sep 17 00:00:00 2001 From: Marcell Egyed Date: Wed, 11 Sep 2024 10:19:59 +0200 Subject: [PATCH] Add argumentless overload for get_sql_name() Comes handy with template metaprogramming. --- include/sqlpp11/functions.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/sqlpp11/functions.h b/include/sqlpp11/functions.h index acf0e680..eadd33c6 100644 --- a/include/sqlpp11/functions.h +++ b/include/sqlpp11/functions.h @@ -130,9 +130,15 @@ namespace sqlpp return {c}; } - template - constexpr const char* get_sql_name(const T& /*unused*/) - { - return name_of::template char_ptr(); + template + constexpr const char* get_sql_name() + { + return name_of::template char_ptr(); + } + + template + constexpr const char* get_sql_name(const T& /*unused*/) + { + return get_sql_name(); } } // namespace sqlpp