Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337293

Use constexpr instead of const in globalDefinitions.hpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • hotspot

      For JDK-8301403 we needed to change a few defines in src/hotspot/share/utilities/globalDefinitions.hpp from "const" to "constexpr", but now we are left with mixture of both.

      I think we should change the remaining definitions from const to constexpr to be consistent.

      constexpr is semantically identical to const, with the added benefit of being computed at compile-time, and can be used to define array's sizes, where const can not.

            gziemski Gerard Ziemski
            gziemski Gerard Ziemski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: