[libcxx-commits] [PATCH] D124103: [libc++] Fixes concepts overload resolution.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 23 09:19:16 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7a98d8351b27: [libc++] Fixes concepts overload resolution. (authored by Mordante).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124103/new/
https://reviews.llvm.org/D124103
Files:
libcxx/include/__format/format_arg.h
Index: libcxx/include/__format/format_arg.h
===================================================================
--- libcxx/include/__format/format_arg.h
+++ libcxx/include/__format/format_arg.h
@@ -160,17 +160,17 @@
};
__format::__arg_t __type_;
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(bool __v) noexcept
+ _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(const bool& __v) noexcept
: __boolean(__v), __type_(__format::__arg_t::__boolean) {}
template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(_Tp __v) noexcept
+ _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(const _Tp& __v) noexcept
requires(same_as<_Tp, char_type> ||
(same_as<_Tp, char> && same_as<char_type, wchar_t>))
: __char_type(__v), __type_(__format::__arg_t::__char_type) {}
template <__libcpp_signed_integer _Tp>
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(_Tp __v) noexcept {
+ _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(const _Tp& __v) noexcept {
if constexpr (sizeof(_Tp) <= sizeof(int)) {
__int = static_cast<int>(__v);
__type_ = __format::__arg_t::__int;
@@ -189,7 +189,7 @@
}
template <__libcpp_unsigned_integer _Tp>
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(_Tp __v) noexcept {
+ _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(const _Tp& __v) noexcept {
if constexpr (sizeof(_Tp) <= sizeof(unsigned)) {
__unsigned = static_cast<unsigned>(__v);
__type_ = __format::__arg_t::__unsigned;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124103.424724.patch
Type: text/x-patch
Size: 1513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220423/0e243446/attachment.bin>
More information about the libcxx-commits
mailing list