Reimplement STATIC_ASSERT to use static_assert

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: 18
    • Component/s: hotspot
    • None
    • gc
    • b21

      We currently have a bespoke implementation of STATIC_ASSERT, which was added before we transitioned over to C++14. I recently saw some compiler warnings about that implementation. I propose that we reimplement STATIC_ASSERT to use static_assert.

      An alternative would be to completely remove STATIC_ASSERT. That would change > 400 usages. Moreover, static_assert requires message string. That changes with C++17, so maybe wait with removing STATIC_ASSERT until then?

            Assignee:
            Stefan Karlsson
            Reporter:
            Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: