Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/hotspot-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,8 @@ <h3 id="attributes">Attributes</h3>
<h3 id="additional-permitted-features">Additional Permitted
Features</h3>
<ul>
<li><p>Rvalue references and move semantics (<a
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1690.html">n1690</a>)</p></li>
<li><p><code>alignof</code> (<a
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">n2341</a>)</p></li>
<li><p><code>constexpr</code> (<a
Expand Down Expand Up @@ -1203,7 +1205,6 @@ <h3 id="undecided-features">Undecided Features</h3>
href="https://isocpp.org/files/papers/N3651.pdf">n3651</a>)</p></li>
<li><p>Member initializers and aggregates (<a
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
<li><p>Rvalue references and move semantics</p></li>
</ul>
</body>
</html>
13 changes: 11 additions & 2 deletions doc/hotspot-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,17 @@ The following attributes are expressly forbidden:

### Additional Permitted Features

* Rvalue references and move semantics
([n1690](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1690.html))
* Use `std::move` when moving an object.
Rvalue references and move semantics is an advanced C++ concept and should be
treated as such. In HotSpot we prefer copy construction when possible.
However, we do recognize that there are cases where move semantics permit significant
ergonomic and performance advantages to the developer.
For example, if you have a data structure T which is non-copyable but needs to
be stored in a resizable container, then defining a move constructor may be preferable
to changing the contained element type from T to T\*.

* `alignof`
([n2341](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf))

Expand Down Expand Up @@ -1210,8 +1221,6 @@ features that have not yet been discussed.
* Member initializers and aggregates
([n3653](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html))

* Rvalue references and move semantics

[ADL]: https://en.cppreference.com/w/cpp/language/adl
"Argument Dependent Lookup"

Expand Down