pqxx::byte and pqxx::bytes_view to support lack of std::char_traits<byte> (#751)
The standard doesn't specify a generic implementation of std::char_traits, only specializations for certain types.
For a good reason: it's unlikely to be correct for all types that it'll compile with it.
All standard libraries today however do provide a generic implementation as an extension, though it's bound to be incorrect for some types.
libc++ has deprecated its in version 18 and will remove it in version 19 to eliminate hard to find correctness issues stemming from this.
Replace with type aliases that will use a custom char_traits when the standard library lacks such a generic implementation.
Note that we don't unconditionally use the custom char_traits variant as it's a source-breaking change requiring the users to update all usages of `std::string<std::byte>` to `pqxx::bytes` (i.e. `std::string<std::byte, pqxx::byte_char_traits>`). Ditto `std::string_view<std::byte>` and `pqxx::bytes_view`.
But for implementations lacking a generic implementation `std::string<std::byte>` and `std::string_view<std::byte>` wouldn't compile anyway so it's fine.
The aliases are named as `bytes` and `bytes_view` with the intetion of switching them to `std::vector<std::byte>` and `std::span<std::byte>` in a future major release that requires C++20.
Fixes: #726
By Raul Tambre <email address hidden>
6120486...
by
Jeroen Vermeulen <email address hidden>
Just always `pip install ruff pyflakes3`. (#788)
In the lint script, the logic for calling ruff and/or pyflakes or pyflakes3 got too tedious. Just pip install them every time and we know what to count on.
And since we'll then always have the virtualenv, this also installs clang-tidy in there, rather than looking for it installed with the OS.
afaab9b...
by
Jeroen Vermeulen <email address hidden>
Update copyright notices to 2024. (#787)
c22e4ad...
by
Jeroen Vermeulen <email address hidden>