lmi
[Top][All Lists]
Advanced

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

Re: [lmi] std::identity unavailable in clang libc++


From: Greg Chicares
Subject: Re: [lmi] std::identity unavailable in clang libc++
Date: Wed, 14 Jul 2021 13:35:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 2021-07-14 12:33, Vadim Zeitlin wrote:
> On Wed, 14 Jul 2021 02:11:02 +0000 Greg Chicares <gchicares@sbcglobal.net> 
> wrote:
> 
> GC> On 2021-07-05 13:02, Vadim Zeitlin wrote:
> GC> > 
> GC> > 2. Define std::identity in case __cpp_lib_type_identity is not defined.
[...]
> GC> >  The obvious problem of (2) is that we are not allowed to do this, but 
> OTOH
> GC> > I can't see what problems could this ever cause this in practice -- and 
> the
> GC> > code doing it, inside "#ifndef __cpp_lib_type_identity", wouldn't ever 
> be
> GC> > used for production builds using gcc anyhow. So personally I'd rather do
> GC> > (2) and keep lmi_root() itself unchanged. Would you agree with such 
> hack?
> GC> 
> GC> I'd have preferred that, yes. What I did is arguably more hackish.
> 
>  Please let me know if you'd like me to make a patch with such checks.

No thanks. I think that we should revert commit 4d8cb229289 when the
oldest clang we want to use acquires std::identity; but that until
then we should do nothing.

[...a different clang warning...]
> financial_test.cpp:96:37: error: variable 'unoptimizable' is uninitialized 
> when passed as a const reference argument here 
> [-Werror,-Wuninitialized-const-reference]
>     stifle_warning_for_unused_value(unoptimizable);
>                                     ^~~~~~~~~~~~~
[...]
>  We have already had the same problem recently and so I think it should be
> fixed in the same way it was done in 0380e928c (Move
> stifle_warning_for_unused_value() after setting the value, 2021-04-28), see
> https://lists.nongnu.org/archive/html/lmi/2021-04/msg00058.html

Done: commit debc275b96.


reply via email to

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