-struct is_const_iterator
- : std::conditional_t<std::is_const_v<std::remove_pointer_t<typename It::pointer>>,
- std::true_type,
- std::false_type>
-{};
-template<>
-struct is_const_iterator<size_t> : std::false_type {};
-template<>
-struct is_const_iterator<ceph::buffer::list::contiguous_appender> : std::false_type {
- // appender is used for *changing* the buffer
+concept is_const_iterator = requires(It& it, size_t n) {
+ { it.get_pos_add(n) } -> std::same_as<const char*>;