WPILibC++ 2025.3.2
Loading...
Searching...
No Matches
fmt::formatter< Unit, CharT, std::enable_if_t< units::traits::is_unit_t_v< Unit > > > Struct Template Reference

Formatter for unit types. More...

#include <units/formatter.h>

Public Member Functions

template<typename ParseContext >
constexpr auto parse (ParseContext &ctx)
 
template<typename FmtContext >
auto format (const Unit &obj, FmtContext &ctx) const
 Writes out a formatted unit.
 

Detailed Description

template<typename Unit, typename CharT>
struct fmt::formatter< Unit, CharT, std::enable_if_t< units::traits::is_unit_t_v< Unit > > >

Formatter for unit types.

Member Function Documentation

◆ format()

template<typename Unit , typename CharT >
template<typename FmtContext >
auto fmt::formatter< Unit, CharT, std::enable_if_t< units::traits::is_unit_t_v< Unit > > >::format ( const Unit & obj,
FmtContext & ctx ) const
inline

Writes out a formatted unit.

Parameters
objUnit instance.
ctxFormat string context.

◆ parse()

template<typename Unit , typename CharT >
template<typename ParseContext >
auto fmt::formatter< Unit, CharT, std::enable_if_t< units::traits::is_unit_t_v< Unit > > >::parse ( ParseContext & ctx)
inlineconstexpr

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