|
microfmt
Zero-allocation C++ formatting for constrained environments
|
Format map-like ranges with zero-allocation key and value views. More...
#include "../microfmt.hpp"#include <cstddef>#include <string_view>#include <type_traits>#include <utility>
Go to the source code of this file.
Namespaces | |
| namespace | microfmt |
| namespace | microfmt::detail |
Typedefs | |
| template<typename T > | |
| using | microfmt::detail::remove_cvref_map_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type |
Functions | |
| template<typename MapContainer > | |
| constexpr auto | microfmt::map_view (const MapContainer &m) noexcept |
| template<typename MapContainer , std::enable_if_t<!std::is_lvalue_reference_v< MapContainer >, int > = 0> | |
| constexpr auto | microfmt::map_view (MapContainer &&) noexcept=delete |
| template<typename MapContainer , typename KeyFn , typename ValFn > | |
| constexpr auto | microfmt::map_view (const MapContainer &m, KeyFn &&kfn, ValFn &&vfn) noexcept |
| template<typename MapContainer , typename KeyFn , typename ValFn , std::enable_if_t<!std::is_lvalue_reference_v< MapContainer >, int > = 0> | |
| constexpr auto | microfmt::map_view (MapContainer &&, KeyFn &&, ValFn &&) noexcept=delete |
| template<typename Iterator , typename Sentinel , typename KeyFn = default_key_fn, typename ValFn = default_val_fn, typename std::enable_if< detail::is_dereferenceable< Iterator >::value, int >::type = 0> | |
| constexpr auto | microfmt::map_view (Iterator first, Sentinel last, KeyFn &&kfn=KeyFn{}, ValFn &&vfn=ValFn{}) noexcept |
Format map-like ranges with zero-allocation key and value views.
Use microfmt::map_view with standard map containers, iterator ranges, or custom key/value extractors for intrusive and flat containers. Default formatting renders {key: value} entries. Use b, c, or n to select brackets, braces, or no outer delimiters; remaining format characters are forwarded to both keys and values.