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

Format std::tuple and other tuple-like values without allocation. More...

#include "../microfmt.hpp"
#include <array>
#include <cstddef>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <utility>
Include dependency graph for tuple.hpp:

Go to the source code of this file.

Classes

struct  microfmt::detail::has_data< T, typename >
 
struct  microfmt::detail::has_data< T, std::void_t< decltype(std::declval< T & >().data())> >
 
struct  microfmt::detail::is_tuple_like< T, typename >
 
struct  microfmt::detail::is_tuple_like< T, std::void_t< decltype(std::tuple_size< remove_cvref_t< T > >::value)> >
 
struct  microfmt::formatter< T, std::enable_if_t< detail::is_tuple_like< T >::value > >
 

Namespaces

namespace  microfmt
 
namespace  microfmt::detail
 

Typedefs

template<typename T >
using microfmt::detail::remove_cvref_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type
 

Functions

template<typename Tuple , size_t... Is>
void microfmt::detail::format_tuple_impl (const Tuple &t, const sink &out, microfmt::string_view sep, microfmt::string_view spec, std::index_sequence< Is... >) noexcept
 

Detailed Description

Format std::tuple and other tuple-like values without allocation.

Tuple-like types with std::tuple_size and std::get support are rendered in parentheses by default. Use b, c, n, or p to select brackets, braces, no delimiters, or parentheses respectively; the remainder of the specifier is forwarded to every tuple element.