Commit 1a109427 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

strings/char_traits.h: use HAS_FEATURE instead of __has_feature

This is for cl.exe build.

Change-Id: Icce6bbb29225d2f77d4b1105778aa26d9416c5e4
Reviewed-on: https://chromium-review.googlesource.com/1046425Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556429}
parent 978e7507
......@@ -7,6 +7,8 @@
#include <stddef.h>
#include "base/compiler_specific.h"
namespace base {
// constexpr version of http://en.cppreference.com/w/cpp/string/char_traits.
......@@ -61,7 +63,7 @@ struct CharTraits<char> {
constexpr int CharTraits<char>::compare(const char* s1,
const char* s2,
size_t n) noexcept {
#if __has_feature(cxx_constexpr_string_builtins)
#if HAS_FEATURE(cxx_constexpr_string_builtins)
return __builtin_memcmp(s1, s2, n);
#else
for (; n; --n, ++s1, ++s2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment