Skip to content

Commit 4dad086

Browse files
committed
Maybe easier to grok for MSVC
1 parent fa0fe88 commit 4dad086

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/sqlpp11/union.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ namespace sqlpp
215215

216216
using lhs_result_row_t = get_result_row_t<derived_statement_t<Policies>>;
217217
using rhs_result_row_t = get_result_row_t<Rhs>;
218-
static_assert(lhs_result_row_t::is_compatible(detail::type_vector<rhs_result_row_t>{}),
218+
constexpr auto vec_rhs = detail::type_vector<rhs_result_row_t>{};
219+
static_assert(lhs_result_row_t::is_compatible(vec_rhs),
219220
"both arguments in a union have to have the same result columns (type and name)");
220221
static_assert(
221222
is_static_result_row_t<lhs_result_row_t>::value && is_static_result_row_t<rhs_result_row_t>::value,
@@ -236,7 +237,8 @@ namespace sqlpp
236237

237238
using lhs_result_row_t = get_result_row_t<derived_statement_t<Policies>>;
238239
using rhs_result_row_t = get_result_row_t<Rhs>;
239-
static_assert(lhs_result_row_t::is_compatible(detail::type_vector<rhs_result_row_t>{}),
240+
constexpr auto vec_rhs = detail::type_vector<rhs_result_row_t>{};
241+
static_assert(lhs_result_row_t::is_compatible(vec_rhs),
240242
"both arguments in a union have to have the same result columns (type and name)");
241243
static_assert(
242244
is_static_result_row_t<lhs_result_row_t>::value && is_static_result_row_t<rhs_result_row_t>::value,

0 commit comments

Comments
 (0)