RFR: 8330532: Improve line-oriented text parsing in HotSpot
John R Rose
jrose at openjdk.org
Mon Apr 22 18:31:30 UTC 2024
On Mon, 22 Apr 2024 18:16:20 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/utilities/istream.hpp line 374:
>>
>>> 372: : _fs(_private_fs), _private_fs(arg...)
>>> 373: {
>>> 374: }
>>
>> can you put {} on line 372, this doesn't need so much vertical space.
>
> Is this ... in template typename parameters allowed by our coding standard (whatever it means?)
Yes. It’s called “variadic templates”; see `doc/hotspot-style.md`. The usage appears twice already, in `metaprogramming/logical.hpp` and `asm/register.hpp`. The usage here is pretty straightforward IMO: It just forwards constructor argument lists unchanged. This is useful for wrappers (where you construct the wrapped thing as a field) or subclass factoring (where you construct the super).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1575200336
More information about the hotspot-dev
mailing list