Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
ranges.h File Reference
#include <initializer_list>
#include <tuple>
#include <type_traits>
#include "format.h"
Include dependency graph for ranges.h:

Go to the source code of this file.

Classes

struct  detail::all< Container >
 
struct  detail::conditional_helper< Ts >
 
struct  conjunction<... >
 
struct  conjunction< P >
 
struct  conjunction< P1, Pn... >
 
struct  detail::format_tuple_element< FormatContext >
 
struct  formatter< R, Char, enable_if_t< conjunction< bool_constant< range_format_kind< R, Char >::value !=range_format::disabled >, detail::is_formattable_delayed< R, Char > >::value > >
 
struct  formatter< T, Char, enable_if_t< conjunction< detail::is_container_adaptor_like< T >, bool_constant< range_format_kind< T, Char >::value==range_format::disabled > >::value > >
 
struct  formatter< Tuple, Char, enable_if_t< fmt::is_tuple_like< Tuple >::value &&fmt::is_tuple_formattable< Tuple, Char >::value > >
 
struct  formatter< tuple_join_view< Char, T... >, Char >
 
struct  detail::has_const_begin_end< T, Enable >
 
struct  detail::has_const_begin_end< T, void_t< decltype(detail::range_begin(std::declval< const remove_cvref_t< T > & >())), decltype(detail::range_end(std::declval< const remove_cvref_t< T > & >()))> >
 
struct  detail::has_member_fn_begin_end_t< T, Enable >
 
struct  detail::has_member_fn_begin_end_t< T, void_t< decltype(std::declval< T >().begin()), decltype(std::declval< T >().end())> >
 
struct  detail::has_mutable_begin_end< T, Enable >
 
struct  detail::has_mutable_begin_end< T, void_t< decltype(detail::range_begin(std::declval< T >())), decltype(detail::range_end(std::declval< T >())), int > >
 
struct  detail::integer_sequence< T, N >
 
class  detail::is_container_adaptor_like< T >
 
struct  detail::is_formattable_delayed< R, Char >
 
class  detail::is_map< T >
 
struct  is_range< T, Char >
 
struct  detail::is_range_< T, _ >
 
struct  detail::is_range_< T, void >
 
class  detail::is_set< T >
 
class  detail::is_std_string_like< T >
 
struct  detail::is_std_string_like< fmt::basic_string_view< Char > >
 
struct  is_tuple_formattable< T, C >
 
class  detail::is_tuple_formattable_< T, C, bool >
 
class  detail::is_tuple_formattable_< T, C, true >
 
struct  is_tuple_like< T >
 
class  detail::is_tuple_like_< T >
 
struct  detail::make_integer_sequence< T, N, Ns >
 
struct  detail::make_integer_sequence< T, 0, Ns... >
 
struct  detail::parse_empty_specs< ParseContext >
 
struct  detail::range_default_formatter< K, R, Char, Enable >
 
struct  detail::range_default_formatter< K, R, Char, enable_if_t<(K==range_format::sequence||K==range_format::map||K==range_format::set)> >
 
struct  range_format_kind< T, Char, Enable >
 
struct  detail::range_format_kind_< T >
 
struct  range_formatter< T, Char, Enable >
 
struct  range_formatter< T, Char, enable_if_t< conjunction< std::is_same< T, remove_cvref_t< T > >, is_formattable< T, Char > >::value > >
 
struct  detail::range_mapper< Context >
 
struct  tuple_join_view< Char, T >
 

Namespaces

 detail
 
 detail::tuple
 

Macros

#define FMT_DECLTYPE_RETURN(val)
 
#define FMT_TUPLE_JOIN_SPECIFIERS   0
 

Typedefs

template<size_t... N>
using detail::index_sequence = integer_sequence< size_t, N... >
 
template<size_t N>
using detail::make_index_sequence = make_integer_sequence< size_t, N >
 
template<typename R >
using detail::maybe_const_range = conditional_t< has_const_begin_end< R >::value, const R, R >
 
template<range_format K>
using detail::range_format_constant = std::integral_constant< range_format, K >
 
template<typename Char , typename Element >
using detail::range_formatter_type = formatter< remove_cvref_t< decltype(range_mapper< buffer_context< Char > >{}.map(std::declval< Element >()))>, Char >
 
template<typename Range >
using detail::range_reference_type = decltype(*detail::range_begin(std::declval< Range & >()))
 
template<typename Char , typename... T>
using detail::tuple::result_t = std::tuple< formatter< remove_cvref_t< T >, Char >... >
 
template<typename T >
using detail::tuple_index_sequence = make_index_sequence< std::tuple_size< T >::value >
 
template<typename Range >
using detail::uncvref_type = remove_cvref_t< range_reference_type< Range > >
 

Enumerations

enum  range_format {
  range_format::disabled, range_format::map, range_format::set, range_format::sequence,
  range_format::string, range_format::debug_string
}
 

Functions

template<typename OutputIt >
auto detail::copy (char ch, OutputIt out) -> OutputIt
 
template<typename OutputIt >
auto detail::copy (const char *str, OutputIt out) -> OutputIt
 
template<typename Range , typename OutputIt >
auto detail::copy (const Range &range, OutputIt out) -> OutputIt
 
template<typename OutputIt >
auto detail::copy (wchar_t ch, OutputIt out) -> OutputIt
 
template<typename Tuple , typename F , size_t... Is>
FMT_CONSTEXPR void detail::for_each (index_sequence< Is... >, Tuple &&t, F &&f)
 
template<typename Tuple , typename F >
FMT_CONSTEXPR void detail::for_each (Tuple &&t, F &&f)
 
template<typename Tuple1 , typename Tuple2 , typename F , size_t... Is>
void detail::for_each2 (index_sequence< Is... >, Tuple1 &&t1, Tuple2 &&t2, F &&f)
 
template<typename Tuple1 , typename Tuple2 , typename F >
void detail::for_each2 (Tuple1 &&t1, Tuple2 &&t2, F &&f)
 
template<typename Tuple , typename Char , std::size_t... Is>
auto detail::tuple::get_formatters (index_sequence< Is... >) -> result_t< Char, decltype(get< Is >(std::declval< Tuple >()))... >
 
template<typename... T>
FMT_CONSTEXPR auto join (const std::tuple< T... > &tuple, basic_string_view< wchar_t > sep) -> tuple_join_view< wchar_t, T... >
 
template<typename... T>
FMT_BEGIN_EXPORT FMT_CONSTEXPR auto join (const std::tuple< T... > &tuple, string_view sep) -> tuple_join_view< char, T... >
 
template<typename T >
auto join (std::initializer_list< T > list, string_view sep) -> join_view< const T *, const T * >
 
template<typename Formatter >
FMT_CONSTEXPR void detail::maybe_set_debug_format (Formatter &,...)
 
template<typename Formatter >
FMT_CONSTEXPR auto detail::maybe_set_debug_format (Formatter &f, bool set) -> decltype(f.set_debug_format(set))
 
template<typename T , std::size_t N>
auto detail::range_begin (const T(&arr)[N]) -> const T *
 
template<typename T >
auto detail::range_begin (T &&rng) -> enable_if_t<!has_member_fn_begin_end_t< T && >::value, decltype(begin(static_cast< T && >(rng)))>
 
template<typename T >
auto detail::range_begin (T &&rng) FMT_DECLTYPE_RETURN(static_cast< T && >(rng).begin())
 
template<typename T , std::size_t N>
auto detail::range_end (const T(&arr)[N]) -> const T *
 
template<typename T >
auto detail::range_end (T &&rng) -> enable_if_t<!has_member_fn_begin_end_t< T && >::value, decltype(end(static_cast< T && >(rng)))>
 
template<typename T >
auto detail::range_end (T &&rng) FMT_DECLTYPE_RETURN(static_cast< T && >(rng).end())
 

Macro Definition Documentation

◆ FMT_DECLTYPE_RETURN

#define FMT_DECLTYPE_RETURN (   val)
Value:
->decltype(val) { return val; } \
static_assert( \
true, "")

Definition at line 93 of file ranges.h.

◆ FMT_TUPLE_JOIN_SPECIFIERS

#define FMT_TUPLE_JOIN_SPECIFIERS   0

Definition at line 589 of file ranges.h.

Enumeration Type Documentation

◆ range_format

enum range_format
strong
Enumerator
disabled 
map 
set 
sequence 
string 
debug_string 

Definition at line 500 of file ranges.h.

Function Documentation

◆ join() [1/3]

template<typename... T>
FMT_CONSTEXPR auto join ( const std::tuple< T... > &  tuple,
basic_string_view< wchar_t >  sep 
) -> tuple_join_view<wchar_t, T...>

Definition at line 712 of file ranges.h.

◆ join() [2/3]

template<typename... T>
FMT_BEGIN_EXPORT FMT_CONSTEXPR auto join ( const std::tuple< T... > &  tuple,
string_view  sep 
) -> tuple_join_view<char, T...>

\rst Returns an object that formats tuple with elements separated by sep.

Example**::

std::tuple<int, char> t = {1, 'a'}; fmt::print("{}", fmt::join(t, ", ")); Output: "1, a" \endrst

Definition at line 706 of file ranges.h.

◆ join() [3/3]

template<typename T >
auto join ( std::initializer_list< T >  list,
string_view  sep 
) -> join_view<const T*, const T*>

\rst Returns an object that formats initializer_list with elements separated by sep.

Example**::

fmt::print("{}", fmt::join({1, 2, 3}, ", ")); Output: "1, 2, 3" \endrst

Definition at line 730 of file ranges.h.



plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:49