Usage of C++ features
David Holmes
david.holmes at oracle.com
Thu Feb 6 03:27:51 PST 2014
Hi Goetz,
On 6/02/2014 8:33 PM, Lindenmaier, Goetz wrote:
> Hi,
>
> wrt. our (SAPs) various ports which are running on old machines, built
> with old compilers for compatibility, I would like to find out about
> the OpenJDK policy regarding 'real' C++ features.
I don't think there is such a thing as "OpenJDK policy" for this. Things
need to be evaluated on their merits taking into account a range of
factors, including compiler compatibility issues.
> Recently, we found increasing usage of C++ features.
>
> - 'throw()' in nmethod operator new
> - usage of namespace std::
AFAICS only std::nothrow is in use, which combines with the use of
throw() in numerous (most?) operator new definitions to make it clear
that these don't throw any exceptions.
That said the compiler folk have expressed interest in using C++
exceptions within the compiler.
> - template template parameters in binaryTreeDictionary.hpp|cpp
Can't comment on that.
> We would like to know whether you are planning to increase the
> usage of C++ or even use C++11 features. Or, whether you are planning
> to keep the policy to avoid C++ features that caused problems to
> compilers in the past.
I can envisage usage of C++11 atomics at some point. But it depends on
it being supported across sufficient compilers. What else is coming in
C++11?
I think everything has to be considered on a case-by-case basis. You
presumably have some things in mind ?
Just my 2c. I'm not a policy maker. :)
Cheers,
David
> Best regards,
> Goetz.
>
More information about the hotspot-dev
mailing list