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:
1 parent
44839f9f24
commit
2c3ff56b67
1 file changed
+6
@@ -47,6 +47,12 @@ namespace Void::Sqlite
|
|||||||
}
|
}
|
||||||
Statement& bind(int index, double value);
|
Statement& bind(int index, double value);
|
||||||
Statement& bind(int index, std::string_view 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, std::nullptr_t);
|
||||||
Statement& bind(int index, const std::optional<std::string>& value);
|
Statement& bind(int index, const std::optional<std::string>& value);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user