There's an error for -fconcepts-ts due to using a concept where a bool
NTTP is required, which is fixed by using the vraiable template that
already exists in the class scope.
This doesn't fix the problem with -fconcepts-ts as changes to the
placement of attributes is also needed.
libstdc++-v3/ChangeLog:
PR testsuite/113366
* include/std/format (basic_format_arg): Use __formattable
variable template instead of __format::__formattable_with
concept.
(cherry picked from commit
6c703b4eb68cbc32de1d62e5b573cb1b9857af29)
// Format as const if possible, to reduce instantiations.
template<typename _Tp>
using __maybe_const_t
- = __conditional_t<__format::__formattable_with<_Tp, _Context>,
- const _Tp, _Tp>;
+ = __conditional_t<__formattable<_Tp>, const _Tp, _Tp>;
template<typename _Tq>
static void
explicit
handle(_Tp& __val) noexcept
{
- if constexpr (!__format::__formattable_with<const _Tp, _Context>)
+ if constexpr (!__formattable<const _Tp>)
static_assert(!is_const_v<_Tp>, "std::format argument must be "
"non-const for this type");