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

HotSpot Style Guide should permit using unevaluated id-expressions

XMLWordPrintable

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

      An id-expression that denotes a non-static class member may be used in a
      `sizeof` expression or a `decltype` expression. This allows obtaining the
      corresponding value without having an instance of the class containing the
      member.

      For example, if we have this class:
      ```
      struct X { int x; };
      ```
      then `sizeof(X::x)` equals `sizeof(int)`, and `decltype(X::x)` is `int`.

      https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html

            Unassigned Unassigned
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: