From 306969488b3fe4b761dbf84f7329d8d92d3cb4e2 Mon Sep 17 00:00:00 2001 From: Frank Park Date: Mon, 20 Feb 2017 19:00:32 -0500 Subject: [PATCH] Fix variadic template pack expansion failure with VS2017 RC --- include/sqlpp11/having.h | 2 +- include/sqlpp11/statement.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/sqlpp11/having.h b/include/sqlpp11/having.h index a5fcfa6c..5f1dec6e 100644 --- a/include/sqlpp11/having.h +++ b/include/sqlpp11/having.h @@ -237,7 +237,7 @@ namespace sqlpp // template // using _check = logic::all_t::value...>; template - struct _check : logic::all_t::value...> + struct _check : logic::all_t::value...>... { }; diff --git a/include/sqlpp11/statement.h b/include/sqlpp11/statement.h index 34af1dcc..20d2490f 100644 --- a/include/sqlpp11/statement.h +++ b/include/sqlpp11/statement.h @@ -121,8 +121,12 @@ namespace sqlpp _required_ctes::size::value == 0; } + // work around for msvc bug: + // error C3520 : 'Policies' : parameter pack must be expanded in this context + using is_missing_policies_t_1 = logic::logic_helper::value...>; + using is_missing_policies_t_2 = logic::logic_helper<(is_missing_t::value && false)...>; using _value_type = - typename std::conditional::value...>::value, + typename std::conditional::value, value_type_of<_result_type_provider>, no_value_t // if a required statement part is missing (e.g. columns in a select), // then the statement cannot be used as a value