diff --git a/include/sqlpp11/union.h b/include/sqlpp11/union.h index 12fed78f..4e044eab 100644 --- a/include/sqlpp11/union.h +++ b/include/sqlpp11/union.h @@ -215,7 +215,8 @@ namespace sqlpp using lhs_result_row_t = get_result_row_t>; using rhs_result_row_t = get_result_row_t; - static_assert(lhs_result_row_t::is_compatible(detail::type_vector{}), + constexpr auto vec_rhs = detail::type_vector{}; + static_assert(lhs_result_row_t::is_compatible(vec_rhs), "both arguments in a union have to have the same result columns (type and name)"); static_assert( is_static_result_row_t::value && is_static_result_row_t::value, @@ -236,7 +237,8 @@ namespace sqlpp using lhs_result_row_t = get_result_row_t>; using rhs_result_row_t = get_result_row_t; - static_assert(lhs_result_row_t::is_compatible(detail::type_vector{}), + constexpr auto vec_rhs = detail::type_vector{}; + static_assert(lhs_result_row_t::is_compatible(vec_rhs), "both arguments in a union have to have the same result columns (type and name)"); static_assert( is_static_result_row_t::value && is_static_result_row_t::value,