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:
Changing this to using iterator_category = std::output_iterator_tag;
fixed the errors.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4