From dd8c4ed3e1e6f1a9bee802b92381d8ac2154ffad Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 7 Jun 2021 20:59:31 +0100 Subject: Simplify and allow offset when creating objects from rows --- lib/dbRecordSet.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dbRecordSet.h b/lib/dbRecordSet.h index 5bd6967..c84bb46 100644 --- a/lib/dbRecordSet.h +++ b/lib/dbRecordSet.h @@ -13,16 +13,16 @@ namespace MyGrate { DbValue operator[](std::size_t col) const; - template> + template auto create() const { - return create(Indices {}); + return create(std::make_index_sequence {}); } - template auto create(std::index_sequence) const + template auto create(std::index_sequence) const { - return std::make_unique((*this)[I]...); + return std::make_unique((*this)[I + O]...); } private: -- cgit v1.2.3