...
template<typename Tk, typename... Types>
std::map<Tk, std::tuple<Types...>> pgDBGetRelationPair(pqxx::connection& conn, const std::string& sqlstatment) {
std::map<Tk, std::tuple<Types...>> exhs;
pqxx::transaction<> txn(conn, "getrelation");
pqxx::result res = txn.exec(sqlstatment);
if (!res.size())
throw std::runtime_error("DB: getrelation table is empty");
for (const auto row: res)
exhs[row[0].as<Tk>()] = std::make_tuple(row[1].as<Types...>()...);
return exhs;
}
std::make_tuple(row[1].as<Types>()...);
https://habr.com/company/pvs-studio/blog/340014/ Почитай, может поможет...
Обсуждают сегодня