Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c++ Subject: Re: flags & flagMask == flagMask can be true for flags != flagMask if flags is a superset of flagMask ? Date: Fri, 19 Aug 2022 16:45:52 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: <86h727u79r.fsf@linuxsc.com> References: <86lerktel8.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="2014dac6a3d293746850a774f0d622e9"; logging-data="1750990"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wZocC5tdrsIdCLKeydNxpIUqZzQue0H8=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:jehC0n/Y3B63khnrSKFPOvOPvEc= sha1:MvDp2bqbATo9xU3ffZmUZZIyUMk= Xref: csiph.com comp.lang.c++:86007 Muttley@dastardlyhq.com writes: > On Fri, 19 Aug 2022 08:53:07 -0700 > Tim Rentsch wrote: > >> Muttley@dastardlyhq.com writes: >> >>> If in doubt just use brackets. They're free. >> >> If in doubt, look up the rule and remove the doubt. > > Yes, so much simpler. > > Very few people remember the precendence of all the operators so only an > arrogant fool wouldn't use brackets if there was any doubt as to what it was. Exactly. That's why I gave the suggestion I did; I would much rather not be in doubt than be an arrogant fool.