diff options
author | avi <avi@chromium.org> | 2015-11-24 06:26:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-24 14:27:16 +0000 |
commit | 4ec0dffe9e013e64058ff506a76bc822957227aa (patch) | |
tree | 505796dd4533ddb36753b6391bb20e59fd1dbd9b /base/containers | |
parent | bfd6ebdc7511f63ebae483cc82ce5ed989f470ca (diff) | |
download | chromium_src-4ec0dffe9e013e64058ff506a76bc822957227aa.zip chromium_src-4ec0dffe9e013e64058ff506a76bc822957227aa.tar.gz chromium_src-4ec0dffe9e013e64058ff506a76bc822957227aa.tar.bz2 |
Switch to static_assert in base/.
BUG=442514
Review URL: https://codereview.chromium.org/1467003002
Cr-Commit-Position: refs/heads/master@{#361337}
Diffstat (limited to 'base/containers')
-rw-r--r-- | base/containers/small_map.h | 2 | ||||
-rw-r--r-- | base/containers/stack_container.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/base/containers/small_map.h b/base/containers/small_map.h index df3d22a..8ae4219 100644 --- a/base/containers/small_map.h +++ b/base/containers/small_map.h @@ -187,7 +187,7 @@ class SmallMap { // particular, gcc 2.95.3 does it but later versions allow 0-length // arrays. Therefore, we explicitly reject non-positive kArraySize // here. - COMPILE_ASSERT(kArraySize > 0, default_initial_size_should_be_positive); + static_assert(kArraySize > 0, "default initial size should be positive"); public: typedef typename NormalMap::key_type key_type; diff --git a/base/containers/stack_container.h b/base/containers/stack_container.h index 54090d3..2c7dd65 100644 --- a/base/containers/stack_container.h +++ b/base/containers/stack_container.h @@ -57,7 +57,7 @@ class StackAllocator : public std::allocator<T> { // buffer of the right size instead. base::AlignedMemory<sizeof(T[stack_capacity]), ALIGNOF(T)> stack_buffer_; #if defined(__GNUC__) && !defined(ARCH_CPU_X86_FAMILY) - COMPILE_ASSERT(ALIGNOF(T) <= 16, crbug_115612); + static_assert(ALIGNOF(T) <= 16, "http://crbug.com/115612"); #endif // Set when the stack buffer is used for an allocation. We do not track |