Deutsch English Français Italiano |
<vbuv8g$a8h2$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Muttley@dastardlyhq.com Newsgroups: comp.lang.c++ Subject: Re: counting_semaphore question Date: Thu, 12 Sep 2024 14:53:04 -0000 (UTC) Organization: A noiseless patient Spider Lines: 24 Message-ID: <vbuv8g$a8h2$1@dont-email.me> References: <vbrqjj$3hvsd$1@dont-email.me> <vbs01c$3j5mc$1@raubtier-asyl.eternal-september.org> <vbs0tm$3jf62$1@dont-email.me> <vbs1al$3jgnp$1@raubtier-asyl.eternal-september.org> <vbs2fm$3jp23$1@dont-email.me> <87ikv1i2yk.fsf@bsb.me.uk> <vbuhk4$7hu2$1@dont-email.me> <vbuu5g$a0rk$1@dont-email.me> Injection-Date: Thu, 12 Sep 2024 16:53:04 +0200 (CEST) Injection-Info: dont-email.me; posting-host="dee5b336ab8993ce946245f7c5d523d8"; logging-data="336418"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rVChvfZS40EKJveniuLiI" Cancel-Lock: sha1:VDZCEgVjbD74s0rbK6Ox1/lk8pM= Bytes: 1843 On Thu, 12 Sep 2024 07:34:23 -0700 Andrey Tarasevich <andreytarasevich@hotmail.com> boringly babbled: >On 09/12/24 4:00 AM, Muttley@dastardlyhq.com wrote: >> >> Clang seems to ignore it. You can call release() as much as you like and >> it'll just keep increasing the counter. >> > >It "ignores" it exactly the same way as the following declaration > > std::uint_fast8_t n = 2; > >might "ignore" the 8 in the type name and allow you to increment the >variable well past 255. Come to think of it, the underlying reasons for Incrementing integrals beyond their max value can have valid uses. A method allowing you to increment a counter beyond the apparent max counter value - not so much. >It is perfectly explained in the spec. And it's been thoroughly LOL! Ah, a comedian has joined us!