From 2c3ff56b677529ed91decf8d4cfb415ffec51042 Mon Sep 17 00:00:00 2001 From: faumaray Date: Wed, 24 Jun 2026 00:41:33 +0300 Subject: [PATCH] Sqlite: add bind(const std::string&) overload Disambiguates std::string arguments to Statement::bind, which otherwise match both bind(string_view) and bind(optional) and are ambiguous. Delegates to the string_view overload. Co-Authored-By: Claude Opus 4.8 --- include/Void/Sqlite/Sqlite.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/Void/Sqlite/Sqlite.hpp b/include/Void/Sqlite/Sqlite.hpp index 6eceb8a..ab85307 100644 --- a/include/Void/Sqlite/Sqlite.hpp +++ b/include/Void/Sqlite/Sqlite.hpp @@ -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). + 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& value);