-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
We have some non-trivial code featuring C++ concepts, which eventually fails on
std::fill_n(ctx.out(), indent, '\t');
where ctx is fmt::format_context.
The relevant part of error output:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:1093:5: note: candidate function template not viable: no known conversion from 'typename iterator_traits<basic_appender<char>>::iterator_category' (aka 'int') to 'std::output_iterator_tag' for 4th argument
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value,
^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:1105:5: note: candidate function template not viable: no known conversion from 'typename iterator_traits<basic_appender<char>>::iterator_category' (aka 'int') to 'std::input_iterator_tag' for 4th argument
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value,
^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:1117:5: note: candidate function template not viable: no known conversion from 'typename iterator_traits<basic_appender<char>>::iterator_category' (aka 'int') to 'std::random_access_iterator_tag' for 4th argument
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value,
^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:1086:5: note: candidate template ignored: could not match '_Safe_iterator' against 'basic_appender'
__fill_n_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>& __first,
I may be able to write a minimal reproducer, but the issue seems obvious:
Line 1163 in bc8d32e
| using iterator_category = int; |
Changing this to using iterator_category = std::output_iterator_tag; fixed the errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels