🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #950

What does this code

#950
From: Bonita Montero
Date: Fri, 20 Nov 2026 07:48
11 lines
1452 bytes
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.
Chris, I'm sure *you* would use relacy with that.
Technical Details
Message-ID: <11dou16$2vlr8$1@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-mail

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: What does this code
Date: Fri, 20 Nov 2026 08:48:56 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <11dou16$2vlr8$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 20 Nov 2026 07:48:55 +0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org;
	logging-data="3135336"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19uAyStE2IJfdFKkDzXM6eBg6hwPj64an4="; posting-host="0ecd4e991e686a5da5d0cdc49024b861"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:DIvw4OPiSFylxvhxTBQZXMmQO8E= sha256:SaZYTPv5Ph0CvUykxvvxKJu7dshkP4C0YtnZ8sXnl9I=
	sha1:s6fi46Cr3Eh4Qx+lHSUK7ciK0Ug= sha256:UgVkALLcNv68fkmx6G7XnmhF96swZOfrcSbGlOYNtlQ=
Content-Language: de-DE