commit | 75697011774ea1802d2f4902608f4188cd580b97 | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Tue Feb 05 18:17:05 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Feb 05 18:17:05 2019 |
tree | fd5af62c5953c7f1bd0b9255d04f9daee59649ee | |
parent | 8823aef123a2579cc5cbcb224214bdc6d050daf9 [diff] |
StringImpl: Move AllocationSize() specialization out of class declaration This fixes the GCC build after commit fdb5f28 ("Use a more obviously-correct way to calculate allocation sizes"): In file included from ../../third_party/blink/renderer/platform/wtf/text/wtf_string.h:33, from ../../third_party/blink/renderer/platform/wtf/decimal.h:38, from ../../third_party/blink/renderer/platform/wtf/decimal_test.cc:31: ../../third_party/blink/renderer/platform/wtf/text/string_impl.h:453:13: error: explicit specialization in non-namespace scope ‘class WTF::StringImpl’ template <> ^ ../../third_party/blink/renderer/platform/wtf/text/string_impl.h:454:49: error: template-id ‘AllocationSize<LChar>’ in declaration of primary template size_t AllocationSize<LChar>(wtf_size_t length) { ^ ../../third_party/blink/renderer/platform/wtf/text/string_impl.h:467:29: error: too many template-parameter-lists scoped_refptr<StringImpl> StripMatchedCharacters(UCharPredicate); ^~~~~~~~~~~~~~~~~~~~~~ ../../third_party/blink/renderer/platform/wtf/text/string_impl.h:469:29: error: too many template-parameter-lists scoped_refptr<StringImpl> SimplifyMatchedCharactersToSpace(UCharPredicate, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Move the new template specialization outside of StringImpl. Having it in StringImpl officially requires C++17 (specifically, C++ DR727). While clang has implemented DR727 for other -std= options, GCC is stricter and only builds that code in C++17 mode. Bug: 819294 Change-Id: I0ab17347b3c9fc75f36c471933eb523ad134d869 Reviewed-on: https://chromium-review.googlesource.com/c/1454533 Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Commit-Queue: Kentaro Hara <haraken@chromium.org> Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#629217}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .