Fix an incorrect soci::use function overload

Previously an overload of the soci::use function accepted a value of
type T and a vector of indicators. This function worked when T was
std::vector<U>, but would fail if T was any other type. Judging by the
comment, the original intent was to have an overload for std::vector<T>.

Closes #1334.

Closes #1336.

Signed-off-by: Innokentiy Alaytsev <alaitsev@gmail.com>
This commit is contained in:
Innokentiy Alaytsev
2026-02-25 15:28:47 +04:00
committed by Vadim Zeitlin
parent 86a7263ce8
commit 01b8b8d586

View File

@@ -71,9 +71,9 @@ details::use_container<const T, indicator> use(T const &t, indicator & ind, std:
// vector containers
template <typename T>
details::use_container<T, std::vector<indicator> >
use(T &t, std::vector<indicator> & ind, const std::string &name = std::string())
{ return details::use_container<T, std::vector<indicator> >(t, ind, name); }
details::use_container<std::vector<T>, std::vector<indicator> >
use(std::vector<T> &t, std::vector<indicator> & ind, const std::string &name = std::string())
{ return details::use_container<std::vector<T>, std::vector<indicator> >(t, ind, name); }
template <typename T>
details::use_container<std::vector<T>, details::no_indicator >