[Webkit-unassigned] [Bug 188501] Meaning of OptionSet::contains is unclear when used with OptionSet argument
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 13 11:16:28 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=188501
--- Comment #4 from Antti Koivisto <koivisto at iki.fi> ---
> I think contains() should act like containsAll(). When I say
You may think that, but the fact the it didn't is a pretty strong indication that not everyone agrees. Better use clear names.
> I do not think this is needed. The bitwise & operator overloading can do
> exactly what this function does. When I say
>
> if (option1 & options2)
contains*() functions are useful because they return bools. For example
bool foo = option1 & options2;
doesn't compile, you need a clunky explicit conversion:
bool foo = !!(option1 & options2);
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180813/55aaf178/attachment.html>
More information about the webkit-unassigned
mailing list