Skip to content

Commit

Permalink
Fixed error with MSVC - fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Apr 19, 2024
1 parent 1c3440e commit f7581a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0 (unreleased)

- Fixed error with MSVC

## 0.1.1 (2022-11-13)

- Added default constructor
Expand Down
4 changes: 4 additions & 0 deletions include/pqxx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ template <> std::string const type_name<pgvector::Vector>{"vector"};
template <> struct nullness<pgvector::Vector> : pqxx::no_null<pgvector::Vector> {};

template <> struct string_traits<pgvector::Vector> {
static constexpr bool converts_to_string{true};

static constexpr bool converts_from_string{true};

static pgvector::Vector from_string(std::string_view text) {
if (text.front() != '[' || text.back() != ']') {
throw conversion_error("Malformed vector literal");
Expand Down

0 comments on commit f7581a9

Please sign in to comment.