55#include <fmt/format.h>
59template <
typename T,
typename V,
typename H>
60struct fmt::formatter<
Gaudi::Property<T, V, H>> : formatter<T> {
62 constexpr auto parse( format_parse_context& ctx ) -> format_parse_context::iterator {
63 auto it = ctx.begin(), end = ctx.end();
64 if ( it != end && *it ==
'?' ) {
67 if ( it != end && *it !=
'}' )
68#if FMT_VERSION >= 110000
69 report_error(
"invalid format" );
71 detail::throw_format_error(
"invalid format" );
75 return formatter<T>::parse( ctx );
79 if constexpr ( std::is_same_v<T, std::string> ) {
81 s << std::quoted( p.
value(),
'\'' );
82 return fmt::format_to( ctx.out(),
" '{}':{}", p.
name(), s.str() );
84 return fmt::format_to( ctx.out(),
" '{}':{}", p.
name(), p.
value() );
87 return formatter<T>::format(
static_cast<const T&
>( p ), ctx );
const std::string name() const
property name
Implementation of property with value of concrete type.
const ValueType & value() const
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...