diff options
author | Randolf J <34705014+jun-sheaf@users.noreply.github.com> | 2022-10-04 20:16:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 20:16:38 +0200 |
commit | 71aa5dda4ca027437a86f087f4fe93f21f5d0638 (patch) | |
tree | b503939ed32a9fef943dbe8af40a1c40679306f5 /absl | |
parent | d113dec8203116a12eb1a2903b5a01e7de604b52 (diff) |
chore: limit to Clang
Diffstat (limited to 'absl')
-rw-r--r-- | absl/strings/charconv.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/strings/charconv.cc b/absl/strings/charconv.cc index db2b392e..88bd7eaf 100644 --- a/absl/strings/charconv.cc +++ b/absl/strings/charconv.cc @@ -347,7 +347,11 @@ bool HandleEdgeCase(const strings_internal::ParsedFloat& input, bool negative, } else { ptrdiff_t nan_size = input.subrange_end - input.subrange_begin; nan_size = std::min(nan_size, kNanBufferSize - 1); +#ifdef __GNUC__ + std::copy_n(input.subrange_begin, nan_size, n_char_sequence); +#else std::copy_n(input.subrange_begin, nan_size, const_cast<char *>(n_char_sequence)); +#endif n_char_sequence[nan_size] = '\0'; } char* nan_argument = const_cast<char*>(n_char_sequence); |