Vita
value.cc
Go to the documentation of this file.
1
13#include <iostream>
14
15#include "kernel/value.h"
16
17namespace vita
18{
19
27std::ostream &operator<<(std::ostream &o, const value_t &v)
28{
29 // A more general implementation at
30 // https://stackoverflow.com/a/47169101/3235496
31
32 std::visit([&](auto &&arg) { o << arg; }, v);
33 return o;
34}
35
36} // namespace vita
The main namespace for the project.
std::ostream & operator<<(std::ostream &o, hash_t h)
Mainly useful for debugging / testing.
Definition: cache_hash.cc:56
std::variant< D_VOID, D_INT, D_DOUBLE, D_STRING > value_t
A variant containing the data types used by the interpreter for internal calculations / output value ...
Definition: value.h:45