[libcxx-commits] [libcxx] 1dbe32d - [libc++] Use reserved identifier for template parameter
Alex Brachet via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 18 11:23:31 PST 2022
Author: Alex Brachet
Date: 2022-01-18T19:20:25Z
New Revision: 1dbe32dd9c3d5feef1e3cd58fe2747d933e6f921
URL: https://github.com/llvm/llvm-project/commit/1dbe32dd9c3d5feef1e3cd58fe2747d933e6f921
DIFF: https://github.com/llvm/llvm-project/commit/1dbe32dd9c3d5feef1e3cd58fe2747d933e6f921.diff
LOG: [libc++] Use reserved identifier for template parameter
`T` is not a valid identifier for libc++ to use, use `_Tp` instead. Caught from D116957
Reviewed By: Quuxplusone
Differential Revision: https://reviews.llvm.org/D117582
Added:
Modified:
libcxx/include/locale
Removed:
################################################################################
diff --git a/libcxx/include/locale b/libcxx/include/locale
index 86af26c3e35ef..7c2d2361f7513 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -416,11 +416,11 @@ struct __num_get
unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
unsigned* __g, unsigned*& __g_end, const _CharT* __atoms);
private:
- template<typename T>
- const T* __do_widen_p(ios_base& __iob, T* __atoms) const
+ template<typename _Tp>
+ const _Tp* __do_widen_p(ios_base& __iob, _Tp* __atoms) const
{
locale __loc = __iob.getloc();
- use_facet<ctype<T> >(__loc).widen(__src, __src + 26, __atoms);
+ use_facet<ctype<_Tp> >(__loc).widen(__src, __src + 26, __atoms);
return __atoms;
}
More information about the libcxx-commits
mailing list