|
Boost Users : |
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2020-03-09 10:31:24
On Mon, 9 Mar 2020 at 04:59, Leo Carreon via Boost-users
<boost-users_at_[hidden]> wrote:
> [...]
> Is there a possible workaround other than doing this:
>
> BOOST_TEST((string_1 == string_2));
>
> Note that I have provided the following functions to allow the printing of
> std::u8string, std::u8string_view and char8_t*:
>
> std::ostream& std::operator<<(std::ostream&, std::u8string_view);
> std::ostream& std::operator<<(std::ostream&, const char8_t*);
>
> To allow the printing of the compared values.
>
> BTW, Boost.Test seems to be happy with the following test:
>
> auto string_1 = u8"sample"s; // this creates a std::u8string variable
> auto string_2 = u8"sample"; // this creates a const char8_t* variable
> BOOST_TEST(string_1 == string_2);
Sorry, I don't know.
There is this BOOST_TEST_STRING_VIEW macro,
but it remains undocumented as far as I can see,
which may be auto-defined or user is expected to define it.
Perhaps, it will help.
Best regards,
-- Mateusz Loskot, http://mateusz.loskot.net
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net