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

Reimplement STATIC_ASSERT to use static_assert

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • 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?

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

              Created:
              Updated:
              Resolved: