Hyperiso
1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
UtilOutput.h
Go to the documentation of this file.
1
#include <string>
2
#include <variant>
3
#include <iomanip>
4
5
#include "
ObjectsOutputs.h
"
6
7
inline
std::string
to_string_value
(
const
Value
& v) {
8
struct
{
9
std::string operator()(std::monostate)
const
{
return
""
; }
10
std::string operator()(
double
x)
const
{
11
std::ostringstream oss;
12
oss << std::setprecision(17) << x;
13
return
oss.str();
14
}
15
std::string operator()(int64_t x)
const
{
return
std::to_string(x); }
16
std::string operator()(
bool
b)
const
{
return
b ?
"true"
:
"false"
; }
17
std::string operator()(
const
std::string& s)
const
{
return
s; }
18
} visitor;
19
return
std::visit(visitor, v);
20
}
ObjectsOutputs.h
Value
std::variant< std::monostate, double, int64_t, bool, std::string > Value
Definition
ObjectsOutputs.h:9
to_string_value
std::string to_string_value(const Value &v)
Definition
UtilOutput.h:7
Hyperiso
core
src
UserInterface
UtilOutput.h
Generated by
1.9.8