diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h index bb20ee69..3157b2bf 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/insert_value_list.h @@ -322,7 +322,10 @@ namespace sqlpp template using _new_statement_t = typename Policies::template _new_statement_t; - static void _check_consistency() {} + static void _check_consistency() + { + static_assert(wrong_t<_methods_t>::value, "insert values required, e.g. set(...) or default_values()"); + } auto default_values() -> _new_statement_t diff --git a/include/sqlpp11/update_list.h b/include/sqlpp11/update_list.h index 6b8a255a..1ee40173 100644 --- a/include/sqlpp11/update_list.h +++ b/include/sqlpp11/update_list.h @@ -167,7 +167,10 @@ namespace sqlpp template using _new_statement_t = typename Policies::template _new_statement_t; - static void _check_consistency() {} + static void _check_consistency() + { + static_assert(wrong_t<_methods_t>::value, "update assignments required, i.e. set(...)"); + } template auto set(Assignments... assignments)