|
Uni20
Asynchronous tensor and runtime library.
|
An immutable owned value that retains its native scalar and optional type. More...
#include <metadata.hpp>
Public Member Functions | |
| template<presentation::DataTableValue T> | |
| T | as () const |
| Convert without a double intermediate; textual numbers use the destination's parser. | |
| template<typename T > | |
| T const & | get () const |
| Access the exact declared type; a mismatch throws std::bad_any_cast. | |
| metadata_value (char const *text) | |
| metadata_value (std::string_view text) | |
| template<presentation::DataTableValue T> | |
| metadata_value (T value) | |
| bool | missing () const |
| std::string | text (presentation::data_column_display const &format={}, bool machine=false) const |
| std::type_index | type () const |
An immutable owned value that retains its native scalar and optional type.
Copies share immutable storage. Text views and C strings are copied on entry. Supported types follow presentation::DataTableValue. MPFR values retain their exact/approximate state and precision; conversion to MPFR requires explicit precision.
|
inline |
|
inline |
|
inline |
|
inline |
Convert without a double intermediate; textual numbers use the destination's parser.
Integer and half-integer narrowing is checked. Real rounding follows the target type; finite overflow is rejected. A real is never implicitly rounded to an integer.
|
inline |
Access the exact declared type; a mismatch throws std::bad_any_cast.
|
inline |
|
inline |
|
inline |