AsmGrader
0.0.0
Loading...
Searching...
No Matches
unknown.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <fmt/base.h>
4
#include <fmt/format.h>
5
6
#include <string>
7
8
namespace
asmgrader
{
9
10
template
<
typename
T>
11
inline
std::string
fmt_or_unknown
(T&& value, fmt::fstring<T> fmt =
"{}"
) {
12
if
constexpr
(fmt::formattable<T>) {
13
return
fmt::format(fmt, std::forward<T>(value));
14
}
else
{
15
return
"<unknown>"
;
16
}
17
}
18
19
}
// namespace asmgrader
asmgrader
Definition
asm_buffer.hpp:19
asmgrader::fmt_or_unknown
std::string fmt_or_unknown(T &&value, fmt::fstring< T > fmt="{}")
Definition
unknown.hpp:11
include
asmgrader
common
formatters
unknown.hpp
Generated by
1.12.0