From 4dad08653ab1fcf16dd979b2156ad010eb31c0cc Mon Sep 17 00:00:00 2001 From: rbock Date: Tue, 11 Oct 2016 07:19:39 +0200 Subject: [PATCH] Maybe easier to grok for MSVC --- include/sqlpp11/union.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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,