Article View: comp.lang.c++
Article #951Re: What does this code
From: Bonita Montero
Date: Fri, 20 Nov 2026 07:49
Date: Fri, 20 Nov 2026 07:49
16 lines
1696 bytes
1696 bytes
Am 20.11.2026 um 08:48 schrieb Bonita Montero:
> Cool code without any branches and conditional
> moves if the compiler does it as I intended.
>
> inline xsm_lock::operator int() const noexcept
> {
> return (int)m_shared | -(int)!m_pMtx;
> }
>
> m_pMtx is a pointer.
m_shared is a bool.
> Chris, I'm sure *you* would use relacy with that.
>
Technical Details
Message-ID:
<11dou2d$2vlr8$2@raubtier-asyl.eternal-september.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mailReferences:
<11dou16$2vlr8$1@raubtier-asyl.eternal-september.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero <Bonita.Montero@gmail.com> Newsgroups: comp.lang.c++ Subject: Re: What does this code Date: Fri, 20 Nov 2026 08:49:34 +0100 Organization: A noiseless patient Spider Lines: 16 Message-ID: <11dou2d$2vlr8$2@raubtier-asyl.eternal-september.org> References: <11dou16$2vlr8$1@raubtier-asyl.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 20 Nov 2026 07:49:33 +0000 (UTC) Injection-Info: raubtier-asyl.eternal-september.org; logging-data="3135336"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1809Ya896gTBvY6afJv22KP3GCp7XEjoJ8="; posting-host="0ecd4e991e686a5da5d0cdc49024b861" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:kXlKO5d5eiX6WmYwaDzcFAIOUhw= sha256:OjXr0GqbC3oujOb1kqQePZz2Y1NBkP61oDo6pIsH3co= sha1:sN2Cav9+Qg8+xDZTko3H49vWYNw= sha256:78/qxfcVArMjknjosbGv0RIfmC9FB769JcQYTuTZ4f8= Content-Language: de-DE In-Reply-To: <11dou16$2vlr8$1@raubtier-asyl.eternal-september.org>