From: Arthur O'Dwyer Date: Mon, 10 Jan 2022 17:00:10 +0000 (-0500) Subject: [libc++] _Uglify some template parameter names. NFCI. X-Git-Tag: upstream/15.0.7~20450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8f1a715f00d251187a045ea0496d0efbdde7e7e;p=platform%2Fupstream%2Fllvm.git [libc++] _Uglify some template parameter names. NFCI. --- diff --git a/libcxx/include/numbers b/libcxx/include/numbers index ede4e33..2ac3669 100644 --- a/libcxx/include/numbers +++ b/libcxx/include/numbers @@ -73,42 +73,42 @@ _LIBCPP_BEGIN_NAMESPACE_STD namespace numbers { -template +template inline constexpr bool __false = false; -template +template struct __illformed { - static_assert(__false, "A program that instantiates a primary template of a mathematical constant variable template is ill-formed."); + static_assert(__false<_Tp>, "A program that instantiates a primary template of a mathematical constant variable template is ill-formed."); }; -template inline constexpr T e_v = __illformed{}; -template inline constexpr T log2e_v = __illformed{}; -template inline constexpr T log10e_v = __illformed{}; -template inline constexpr T pi_v = __illformed{}; -template inline constexpr T inv_pi_v = __illformed{}; -template inline constexpr T inv_sqrtpi_v = __illformed{}; -template inline constexpr T ln2_v = __illformed{}; -template inline constexpr T ln10_v = __illformed{}; -template inline constexpr T sqrt2_v = __illformed{}; -template inline constexpr T sqrt3_v = __illformed{}; -template inline constexpr T inv_sqrt3_v = __illformed{}; -template inline constexpr T egamma_v = __illformed{}; -template inline constexpr T phi_v = __illformed{}; - -template inline constexpr T e_v = 2.718281828459045235360287471352662; -template inline constexpr T log2e_v = 1.442695040888963407359924681001892; -template inline constexpr T log10e_v = 0.434294481903251827651128918916605; -template inline constexpr T pi_v = 3.141592653589793238462643383279502; -template inline constexpr T inv_pi_v = 0.318309886183790671537767526745028; -template inline constexpr T inv_sqrtpi_v = 0.564189583547756286948079451560772; -template inline constexpr T ln2_v = 0.693147180559945309417232121458176; -template inline constexpr T ln10_v = 2.302585092994045684017991454684364; -template inline constexpr T sqrt2_v = 1.414213562373095048801688724209698; -template inline constexpr T sqrt3_v = 1.732050807568877293527446341505872; -template inline constexpr T inv_sqrt3_v = 0.577350269189625764509148780501957; -template inline constexpr T egamma_v = 0.577215664901532860606512090082402; -template inline constexpr T phi_v = 1.618033988749894848204586834365638; +template inline constexpr _Tp e_v = __illformed<_Tp>{}; +template inline constexpr _Tp log2e_v = __illformed<_Tp>{}; +template inline constexpr _Tp log10e_v = __illformed<_Tp>{}; +template inline constexpr _Tp pi_v = __illformed<_Tp>{}; +template inline constexpr _Tp inv_pi_v = __illformed<_Tp>{}; +template inline constexpr _Tp inv_sqrtpi_v = __illformed<_Tp>{}; +template inline constexpr _Tp ln2_v = __illformed<_Tp>{}; +template inline constexpr _Tp ln10_v = __illformed<_Tp>{}; +template inline constexpr _Tp sqrt2_v = __illformed<_Tp>{}; +template inline constexpr _Tp sqrt3_v = __illformed<_Tp>{}; +template inline constexpr _Tp inv_sqrt3_v = __illformed<_Tp>{}; +template inline constexpr _Tp egamma_v = __illformed<_Tp>{}; +template inline constexpr _Tp phi_v = __illformed<_Tp>{}; + +template inline constexpr _Tp e_v<_Tp> = 2.718281828459045235360287471352662; +template inline constexpr _Tp log2e_v<_Tp> = 1.442695040888963407359924681001892; +template inline constexpr _Tp log10e_v<_Tp> = 0.434294481903251827651128918916605; +template inline constexpr _Tp pi_v<_Tp> = 3.141592653589793238462643383279502; +template inline constexpr _Tp inv_pi_v<_Tp> = 0.318309886183790671537767526745028; +template inline constexpr _Tp inv_sqrtpi_v<_Tp> = 0.564189583547756286948079451560772; +template inline constexpr _Tp ln2_v<_Tp> = 0.693147180559945309417232121458176; +template inline constexpr _Tp ln10_v<_Tp> = 2.302585092994045684017991454684364; +template inline constexpr _Tp sqrt2_v<_Tp> = 1.414213562373095048801688724209698; +template inline constexpr _Tp sqrt3_v<_Tp> = 1.732050807568877293527446341505872; +template inline constexpr _Tp inv_sqrt3_v<_Tp> = 0.577350269189625764509148780501957; +template inline constexpr _Tp egamma_v<_Tp> = 0.577215664901532860606512090082402; +template inline constexpr _Tp phi_v<_Tp> = 1.618033988749894848204586834365638; inline constexpr double e = e_v; inline constexpr double log2e = log2e_v; diff --git a/libcxx/include/optional b/libcxx/include/optional index 63753d9..917e9b5 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -1167,8 +1167,8 @@ public: }; #if _LIBCPP_STD_VER >= 17 -template - optional(T) -> optional; +template + optional(_Tp) -> optional<_Tp>; #endif // Comparisons between optionals diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 155b775..b401085 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -2318,7 +2318,7 @@ struct __common_type_impl {}; // Clang provides variadic templates in C++03 as an extension. #if !defined(_LIBCPP_CXX03_LANG) || defined(__clang__) # define _LIBCPP_OPTIONAL_PACK(...) , __VA_ARGS__ -template +template struct __common_types; template struct _LIBCPP_TEMPLATE_VIS common_type;