CppCommon  1.0.4.1
C++ Common Library
exceptions.inl
Go to the documentation of this file.
1 
9 #if defined(FMT_VERSION)
10 template <>
11 struct fmt::formatter<CppCommon::Exception> : formatter<std::string_view>
12 {
13  template <typename FormatContext>
14  auto format(const CppCommon::Exception& value, FormatContext& ctx) const
15  {
16  return formatter<string_view>::format(value.string(), ctx);
17  }
18 };
19 #endif
virtual std::string string() const
Get string from the current exception.
Definition: exceptions.cpp:29
C++ Common project definitions.
Definition: token_bucket.h:15
std::string format(fmt::format_string< T... > pattern, T &&... args)
Format string.
Definition: format.inl:12