diff --git a/include/sqlpp11/custom_query.h b/include/sqlpp11/custom_query.h index c9cc80be..1576ca0d 100644 --- a/include/sqlpp11/custom_query.h +++ b/include/sqlpp11/custom_query.h @@ -102,9 +102,9 @@ namespace sqlpp } template - auto with_result_type_of(Part part) -> custom_query_t + auto with_result_type_of(Part part) -> custom_query_t, Parts...> { - return {tuple_cat(std::make_tuple(part), _parts)}; + return {tuple_cat(std::make_tuple(hidden(part)), _parts)}; } std::tuple _parts; diff --git a/include/sqlpp11/hidden.h b/include/sqlpp11/hidden.h index ca44bbf8..81ef18c9 100644 --- a/include/sqlpp11/hidden.h +++ b/include/sqlpp11/hidden.h @@ -29,10 +29,10 @@ namespace sqlpp { - template - struct hidden_t : public Part + template + struct hidden_t : Clause { - hidden_t(Part part) : Part(part) + hidden_t(Clause clause) : Clause(clause) { } @@ -43,11 +43,11 @@ namespace sqlpp ~hidden_t() = default; }; - template - struct serializer_t> + template + struct serializer_t> { using _serialize_check = consistent_t; - using T = hidden_t; + using T = hidden_t; static Context& _(const T&, Context& context) { @@ -55,8 +55,8 @@ namespace sqlpp } }; - template - auto hidden(Part part) -> hidden_t + template + auto hidden(Clause part) -> hidden_t { return {part}; }