microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
microfmt::formatter< raw_ptr_view > Struct Reference

#include <pointer.hpp>

Collaboration diagram for microfmt::formatter< raw_ptr_view >:
Collaboration graph
[legend]

Public Member Functions

MICROFMT_API_CONSTEXPR void parse (format_parse_context &ctx) noexcept
 
MICROFMT_API void format (const raw_ptr_view &ptr, const sink &out) const noexcept
 

Public Attributes

bool uppercase_hex {false}
 
bool show_prefix {true}
 
ptr_width_mode mode {ptr_width_mode::native}
 
size_t custom_width {0}
 
microfmt::string_view null_representation {"(nil)"}
 

Static Public Attributes

static constexpr size_t native_hex_width = sizeof(uintptr_t) * 2
 

Detailed Description

Formatter for raw_ptr_view.

p and P emit lower- or upper-case hexadecimal with 0x/0X prefixes; x and X omit those prefixes. 32 and 64 select fixed compatibility widths, 0N selects a minimum N-digit width, and z renders null as 0x0 instead of (nil).

Member Function Documentation

◆ format()

MICROFMT_API void microfmt::formatter< raw_ptr_view >::format ( const raw_ptr_view &  ptr,
const sink &  out 
) const
noexcept

◆ parse()

Member Data Documentation

◆ custom_width

size_t microfmt::formatter< raw_ptr_view >::custom_width {0}

◆ mode

◆ native_hex_width

constexpr size_t microfmt::formatter< raw_ptr_view >::native_hex_width = sizeof(uintptr_t) * 2
staticconstexpr

◆ null_representation

microfmt::string_view microfmt::formatter< raw_ptr_view >::null_representation {"(nil)"}

◆ show_prefix

bool microfmt::formatter< raw_ptr_view >::show_prefix {true}

◆ uppercase_hex

bool microfmt::formatter< raw_ptr_view >::uppercase_hex {false}

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