Re: using enum classes for enumerated CSS property values in nsStyleConsts.h

Cameron McCormack <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout
Organization Mozilla Corporation
Message-ID <[email protected]>
L. David Baron:
> I'm in favor of making it a struct -- but if it becomes a template,
> won't the functions that accept it have to become templates,
> generating multiple copies of the code where we currently have only
> a single copy?

You’d hope that the compiler would fold together all the versions of the
template that took the same sized enum.  (You could always have a small
inline function that casts to uint8_t and have a common implementation
that works on the untyped values.)

-- 
Cameron McCormack ≝ http://mcc.id.au/
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.