Euphoria
pch.public.h File Reference
#include <fmt/core.h>
#include <fmt/format.h>
#include <fmt/ranges.h>

Go to the source code of this file.

Macros

#define EU_FMT_ENUM_BEGIN(T, DEF)
#define EU_FMT_ENUM_VAL(V)
#define EU_FMT_ENUM_END()
#define ADD_CATCH_FORMATTER_DEF(TYPE)
#define ADD_CATCH_FORMATTER_IMPL(TYPE)

Macro Definition Documentation

◆ ADD_CATCH_FORMATTER_DEF

#define ADD_CATCH_FORMATTER_DEF ( TYPE)
Value:
std::ostream& \
operator<<(std::ostream& stream, const TYPE& v);

Definition at line 42 of file pch.public.h.

◆ ADD_CATCH_FORMATTER_IMPL

#define ADD_CATCH_FORMATTER_IMPL ( TYPE)
Value:
std::ostream& \
operator<<(std::ostream& stream, const TYPE& v) \
{ \
return stream << ::eu::string_from(v); \
}
std::string string_from(const An &a)

Definition at line 46 of file pch.public.h.

◆ EU_FMT_ENUM_BEGIN

#define EU_FMT_ENUM_BEGIN ( T,
DEF )
Value:
template <> struct fmt::formatter<T> : fmt::formatter<std::string_view> {\
template <typename FormatContext>\
auto format(T c, FormatContext& ctx) const {\
using EnumType = T;\
std::string_view name = DEF;\
switch (c) {

Definition at line 23 of file pch.public.h.

◆ EU_FMT_ENUM_END

#define EU_FMT_ENUM_END ( )
Value:
}\
return formatter<string_view>::format(name, ctx);\
}\
};

Definition at line 32 of file pch.public.h.

◆ EU_FMT_ENUM_VAL

#define EU_FMT_ENUM_VAL ( V)
Value:
case EnumType::V: name = #V; break

Definition at line 30 of file pch.public.h.