microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions
pointer.hpp File Reference

Format raw addresses and contiguous pointer ranges deterministically. More...

#include "../microfmt.hpp"
#include <cstddef>
#include <cstdint>
#include <limits>
#include <string_view>
#include <type_traits>
#include "pointer.ipp"
Include dependency graph for pointer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  microfmt::raw_ptr_view
 
struct  microfmt::raw_range_view< T >
 
struct  microfmt::formatter< raw_ptr_view >
 
struct  microfmt::formatter< raw_range_view< T > >
 

Namespaces

namespace  microfmt
 

Enumerations

enum class  microfmt::ptr_width_mode : uint8_t { microfmt::native = 0 , microfmt::compat32 , microfmt::compat64 }
 

Functions

template<typename T >
RELOCO_BEGIN_UNSAFE_CODE constexpr raw_ptr_view microfmt::raw_ptr (const T *ptr, ptr_width_mode mode=ptr_width_mode::native) noexcept
 
RELOCO_END_UNSAFE_CODE constexpr raw_ptr_view microfmt::raw_ptr (std::nullptr_t, ptr_width_mode mode=ptr_width_mode::native) noexcept
 
constexpr raw_ptr_view microfmt::raw_ptr (uintptr_t addr, ptr_width_mode mode=ptr_width_mode::native) noexcept
 
template<typename T >
constexpr raw_ptr_view microfmt::raw_ptr32 (const T *ptr) noexcept
 
constexpr raw_ptr_view microfmt::raw_ptr32 (std::nullptr_t) noexcept
 
constexpr raw_ptr_view microfmt::raw_ptr32 (uintptr_t addr) noexcept
 
template<typename T >
constexpr raw_range_view< T > microfmt::raw_range (const T *first, const T *last) noexcept
 
template<typename T >
constexpr raw_range_view< T > microfmt::raw_range (const T *first, size_t count) noexcept
 

Detailed Description

Format raw addresses and contiguous pointer ranges deterministically.

Use microfmt::raw_ptr for an address view with native, 32-bit, or 64-bit compatibility widths. Use microfmt::raw_range to render the values in a raw contiguous pointer range. Pointer specs support p, P, x, X, 32, 64, zero-padded widths, and z; range specs support b, c, and n and forward the remainder to each element.