]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson: specialize fmt::formatter<>() for crimson types
authorKefu Chai <tchaikov@gmail.com>
Fri, 18 Feb 2022 15:23:54 +0000 (23:23 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 15 Aug 2022 16:28:19 +0000 (18:28 +0200)
commitebcb27d1d9d8346a9d26c42e8a24f3087e6651eb
treea4a7b31b0dc91731e7714e55d0cfa56f0e08fb9a
parent1c6313df9b81ad5ca66d8d2dd4a837183be7b92d
crimson: specialize fmt::formatter<>() for crimson types

otherwise we'd have FTBFS like

/usr/include/fmt/core.h:1727:3: error: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api$
  static_assert(
  ^
/usr/include/fmt/core.h:1853:23: note: in instantiation of function template specialization 'fmt::detail::make_arg<true, fmt::basic_format_context<fmt::appender, char>, fmt::detail::type::custom_type, crimson::os:$
        data_{detail::make_arg<

please note, delta_op_t is lifted out of the templated outer class
to avoid the headache of specialization of template of template in
another namespace.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit bb9d099ede8b9df36dba735a95bc1600fdd11408)
src/crimson/os/seastore/onode_manager/staged-fltree/node_types.h
src/crimson/os/seastore/seastore.cc
src/crimson/os/seastore/segment_manager/block.cc
src/test/crimson/seastore/onode_tree/test_value.h