• Clemens Hammacher's avatar
    Define symbols properly · a52b9cd8
    Clemens Hammacher authored
    The problem popped up when passing the constants by reference
    (https://chromium-review.googlesource.com/c/565141).
    It's a bit ugly, but, the C++11 standard requires a definition
    additionally to the existing declaration in the body of the class:
    
    9.4.2/4: If a static data member is of const literal type, its
      declaration in the class definition can specify a
      brace-or-equal-initializer in which every initializer-clause that is
      an assignment-expression is a constant expression. A static data
      member of literal type can be declared in the class definition with
      the constexpr specifier; if so, its declaration shall specify a
      brace-or-equal-initializer in which every initializer-clause that i
      an assignment-expression is a constant expression. [Note: In both
      these cases, the member may appear in constant expressions. — end
      note] The member shall still be defined in a namespace scope if it is
      odr-used (3.2) in the program and the namespace scope definition shall
      not contain an initializer.
    
    Drive-by: Make the static constants constexpr.
    
    R=bmeurer@chromium.org
    
    Change-Id: Idc3d20bf2adf31d874c23ff8bfec52437789160a
    Reviewed-on: https://chromium-review.googlesource.com/567506Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46599}
    a52b9cd8
heap-snapshot-generator.cc 109 KB