ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
side_efect_expr_function_callt.h
Go to the documentation of this file.
1// LOOK AT <util/message/format.h> FOR MORE INFO ABOUT
2// WHAT THIS FILE IS ABOUT!!!
3
4#ifndef ESBMC_FORMATS_START_ASSERTION
5# error Do not include this header directly, use <util/message/format.h>
6#endif
7
8// side_effect_expr_function_callt Specialization
10template <>
11struct fmt::formatter<side_effect_expr_function_callt>
12{
13 // side_effect_expr_function_callt does not support any specific format
14 constexpr auto parse(format_parse_context &ctx)
15 {
16 auto it = ctx.begin(), end = ctx.end();
17 if (it != end && *it != '}')
18 throw format_error("invalid format");
19 return it;
20 }
21
22 // This will teach fmt how to convert side_effect_expr_function_callt into a
23 // str.
24 template <typename FormatContext>
25 auto
26 format(const side_effect_expr_function_callt &p, FormatContext &ctx) const
27 {
28 return fmt::format_to(ctx.out(), "{}", p.pretty(0));
29 }
30};
Definition std_code.h:905
constexpr auto parse(format_parse_context &ctx)
Definition side_efect_expr_function_callt.h:14
auto format(const side_effect_expr_function_callt &p, FormatContext &ctx) const
Definition side_efect_expr_function_callt.h:26