lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Dealing with deleted operator<<() overloads for wide char type


From: Greg Chicares
Subject: Re: [lmi] Dealing with deleted operator<<() overloads for wide char types in C++20
Date: Thu, 25 Feb 2021 22:35:34 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 2/25/21 8:55 PM, Vadim Zeitlin wrote:
[...]
> [in C++20] we can't insert
> a char16_t value into the stream any more.
> 
>  There are several ways to solve this, but I wonder if it's even worth
> solving it at all, or if we could simply remove test_same() calls for the
> char{16,32}_t and wchar_t types in the test? It seems exceedingly unlikely
> that bourn_cast() would be used with any of these types and, in fact, I
> wonder if we shouldn't just prevent it from being used with them.

I'd like bourn_cast to work in every case where it could possibly make
any sense--not excluding cases that are valid but seem unlikely--and
likewise for its unit test.

I'd be inclined to replace
  INVOKE_BOOST_TEST_EQUAL(x, y, file, line);
(only where it is actually problematic) with
  INVOKE_BOOST_TEST(x == y, file, line);
(I haven't tested that, but I'm sure something like it would work.
The -"_EQUAL" macros are handy because on failure they print the two
values that are unexpectedly unequal; but that handiness isn't very
important for debugged code.)

Do you see a better way, or should I just make it so?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]