RFR: 8263134: HotSpot Style Guide should disallow inheriting constructors

Kim Barrett kbarrett at openjdk.java.net
Fri Mar 4 15:12:37 UTC 2022


Please review this change to explicitly disallow the use of inheriting
constructors:
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm).

The C++11/14 specification has a lot of problems. These were addressed in
C++17 (and as a DR that affects C++11/14):
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html).

Use of inheriting constructors now runs the risk of encountering those bugs,
inconsistent behavior between different compilers or compiler versions, and
behavior changes for future support of C++17.

This is a modification of the Style Guide, so rough consensus among the
HotSpot Group members is required to make this change. Only Group members
should vote for approval (via the github PR), though reasoned objections or
comments from anyone will be considered. A decision on this proposal will not
be made before Friday 18-Mar-2022 at 12h00 UTC.

Since we're piggybacking on github PRs here, please use the PR review process
to approve (click on Review Changes > Approve), rather than sending a "vote:
yes" email reply that would be normal for a CFV.

-------------

Commit messages:
 - update html
 - forbid inherited ctors

Changes: https://git.openjdk.java.net/jdk/pull/7698/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7698&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263134
  Stats: 29 lines in 2 files changed: 29 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7698.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7698/head:pull/7698

PR: https://git.openjdk.java.net/jdk/pull/7698


More information about the hotspot-dev mailing list