File tree Expand file tree Collapse file tree
tests/std/tests/P0645R10_text_formatting_args Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1776,7 +1776,7 @@ struct _Format_arg_traits {
17761776 -> basic_string_view<_Char_type>; // not defined
17771777
17781778 template <class _Traits, class _Alloc>
1779- static auto _Phony_basic_format_arg_constructor(const basic_string<_Char_type, _Traits, _Alloc>& )
1779+ static auto _Phony_basic_format_arg_constructor(basic_string<_Char_type, _Traits, _Alloc>)
17801780 -> basic_string_view<_Char_type>; // not defined
17811781
17821782 static auto _Phony_basic_format_arg_constructor(nullptr_t) -> const void*; // not defined
Original file line number Diff line number Diff line change 77#include < cstdint>
88#include < format>
99#include < memory>
10+ #include < string>
1011#include < string_view>
1112#include < type_traits>
1213#include < variant>
@@ -212,6 +213,9 @@ void test_format_arg_store() {
212213static_assert (sizeof (_Format_arg_index) == sizeof (size_t ));
213214static_assert (is_same_v<_Format_arg_traits<format_context>::_Storage_type<void *>, const void *>);
214215
216+ static_assert (is_same_v<_Format_arg_traits<format_context>::_Storage_type<string>, string_view>);
217+ static_assert (is_same_v<_Format_arg_traits<format_context>::_Storage_type<const string>, string_view>);
218+
215219template <class Context >
216220void test_visit_monostate () {
217221 assert (visit_format_arg (visitor<Context>, basic_format_arg<Context>()) == Arg_type::none);
You can’t perform that action at this time.
0 commit comments