]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/fmt_common: add has_formatter concept
authorSamuel Just <sjust@redhat.com>
Sat, 14 Oct 2023 20:27:51 +0000 (13:27 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 11 Dec 2023 04:10:17 +0000 (04:10 +0000)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/common/fmt_common.h

index 5db8bac43cd7bbd4e5cbc45a81758cefb9e4a6cd..1a2a6eac93576f89234cab81f323904d0c19c7f9 100644 (file)
  * has a begin()/end() method pair. This is a problem because we have
  * such classes in Crimson.
  */
+
+template <typename T>
+concept has_formatter = fmt::has_formatter<T, fmt::format_context>::value;
+
 /**
  * Tagging classes that provide support for default fmtlib formatting,
  * by having either