From 9c38bb5ee7d1d4539fc86df6d9b0c4c0353278dd Mon Sep 17 00:00:00 2001 From: dylanlanigansmith <97814717+dylanlanigansmith@users.noreply.github.com> Date: Thu, 10 Jul 2025 00:28:34 -0700 Subject: [PATCH] Inline pqxx type_name variables avoids ODR violations and makes library much easier to integrate into larger projects. --- include/pgvector/pqxx.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pgvector/pqxx.hpp b/include/pgvector/pqxx.hpp index 8c0812e..ed1bc62 100644 --- a/include/pgvector/pqxx.hpp +++ b/include/pgvector/pqxx.hpp @@ -21,7 +21,7 @@ /// @cond namespace pqxx { -template <> std::string const type_name{"vector"}; +template <> inline std::string const type_name{"vector"}; template <> struct nullness : pqxx::no_null {}; @@ -66,7 +66,7 @@ template <> struct string_traits { } }; -template <> std::string const type_name{"halfvec"}; +template <> inline std::string const type_name{"halfvec"}; template <> struct nullness : pqxx::no_null {}; @@ -111,7 +111,7 @@ template <> struct string_traits { } }; -template <> std::string const type_name{"sparsevec"}; +template <> inline std::string const type_name{"sparsevec"}; template <> struct nullness : pqxx::no_null {};