From 33992a6651512f9807b76b876940d5cf0550cbb2 Mon Sep 17 00:00:00 2001 From: rbock Date: Tue, 23 Aug 2016 18:09:25 +0200 Subject: [PATCH] Fixed hidden return type parts in custom query --- include/sqlpp11/custom_query.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/sqlpp11/custom_query.h b/include/sqlpp11/custom_query.h index 1576ca0d..e5079968 100644 --- a/include/sqlpp11/custom_query.h +++ b/include/sqlpp11/custom_query.h @@ -40,11 +40,23 @@ namespace sqlpp namespace detail { + template + struct unhide + { + using type = T; + }; + template + struct unhide> + { + using type = Clause; + }; + template struct custom_parts_t { using _custom_query_t = custom_query_t; - using _result_type_provider = detail::get_first_if; + using _maybe_hidden_result_type_provider = detail::get_first_if; + using _result_type_provider = typename unhide<_maybe_hidden_result_type_provider>::type; using _result_methods_t = typename _result_type_provider::template _result_methods_t<_result_type_provider>; }; }