• 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
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...