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

Reimplement STATIC_ASSERT to use static_assert

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 18
    • 18
    • hotspot
    • None
    • gc
    • b21

    Description

      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?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: