RFR: 8249944: Move and improve the AllStatic class
Thomas Stüfe
thomas.stuefe at gmail.com
Thu Jul 23 07:36:37 UTC 2020
Hi Kim,
this is great. It allows for many subsequent removals of allocation.hpp.
When should we use AllStatic, when real C++ namespaces?
Patch looks good to me.
Cheers, Thomas
On Thu, Jul 23, 2020 at 9:30 AM Kim Barrett <kim.barrett at oracle.com> wrote:
> Please review this change to the AllStatic base class, making it
> entirely standalone by using C++11 deleted functions to poison the
> constructor and destructor.
>
> To do so we also need to globally disable the Visual Studio C4624
> warning: "'derived class' : destructor was implicitly defined as
> deleted because a base class destructor is inaccessible or deleted."
> Yes, we know that will happen; that's entirely the point of such an
> idiom, and this warning is entirely useless.
>
> The AllStatic class has also been extracted into its own file, so that
> potential users don't need to drag in all of allocation.hpp just to
> obtain this simple base class. I've also made allocation.hpp #include
> this new file, for backward compatibility. I've not searched for and
> updated files that could now just #include the new file rather than
> allocation.hpp; that can be done incrementally during the normal
> course of maintenance.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8249944
>
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8249944/open.00/
>
> Testing:
> mach5 tier1
>
>
More information about the hotspot-dev
mailing list