hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
fmt::formatter< T, std::enable_if_t< std::is_same< decltype(std::declval< T >().toString()), std::string >::value, char > > Struct Template Reference

#include "logger.hpp"

Collaboration diagram for fmt::formatter< T, std::enable_if_t< std::is_same< decltype(std::declval< T >().toString()), std::string >::value, char > >:
Collaboration graph

Public Member Functions

template<typename ParseContext >
ParseContext::iterator parse (ParseContext &ctx)
 
template<typename FormatContext >
auto format (const T &val, FormatContext &ctx) -> decltype(ctx.out())
 

Detailed Description

template<typename T>
struct fmt::formatter< T, std::enable_if_t< std::is_same< decltype(std::declval< T >().toString()), std::string >::value, char > >

Allows to log objects, which have toString() method without calling it, e.g. log.info("{}", myObject)

Member Function Documentation

◆ format()

template<typename T >
template<typename FormatContext >
auto fmt::formatter< T, std::enable_if_t< std::is_same< decltype(std::declval< T >().toString()), std::string >::value, char > >::format ( const T &  val,
FormatContext &  ctx 
) -> decltype(ctx.out())
inline

◆ parse()

template<typename T >
template<typename ParseContext >
ParseContext::iterator fmt::formatter< T, std::enable_if_t< std::is_same< decltype(std::declval< T >().toString()), std::string >::value, char > >::parse ( ParseContext &  ctx)
inline

The documentation for this struct was generated from the following file: