Sqlite: add bind(const std::string&) overload

Disambiguates std::string arguments to Statement::bind, which otherwise
match both bind(string_view) and bind(optional<string>) and are ambiguous.
Delegates to the string_view overload.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 4.8 committed 2026-06-24 00:41:33 +03:00
1 parent 44839f9f24
commit 2c3ff56b67
1 file changed
+6
+6
View File
@@ -47,6 +47,12 @@ namespace Void::Sqlite
}
Statement& bind(int index, double value);
Statement& bind(int index, std::string_view value);
// Disambiguates std::string args (which otherwise match both
// string_view and optional<string>).
Statement& bind(int index, const std::string& value)
{
return bind(index, std::string_view{value});
}
Statement& bind(int index, std::nullptr_t);
Statement& bind(int index, const std::optional<std::string>& value);