Mercurial > hg > CbC > CbC_llvm
diff libcxx/src/string.cpp @ 223:5f17cb93ff66 llvm-original
LLVM13 (2021/7/18)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 18 Jul 2021 22:43:00 +0900 |
parents | 0572611fdcc8 |
children | c4bab56944e8 |
line wrap: on
line diff
--- a/libcxx/src/string.cpp Sun Jul 18 22:10:01 2021 +0900 +++ b/libcxx/src/string.cpp Sun Jul 18 22:43:00 2021 +0900 @@ -20,6 +20,7 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __basic_string_common<true>; +#define _LIBCPP_EXTERN_TEMPLATE_DEFINE(...) template __VA_ARGS__; #ifdef _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, char) _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, wchar_t) @@ -27,10 +28,9 @@ _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, char) _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, wchar_t) #endif +#undef _LIBCPP_EXTERN_TEMPLATE_DEFINE -template - string - operator+<char, char_traits<char>, allocator<char> >(char const*, string const&); +template string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&); namespace { @@ -423,7 +423,7 @@ } template <typename S, typename V> -S i_to_string(const V v) +S i_to_string(V v) { // numeric_limits::digits10 returns value less on 1 than desired for unsigned numbers. // For example, for 1-byte unsigned value digits10 is 2 (999 can not be represented),