/** Print a formatted flexible type to the output stream. */ void _print_flexible_type(std::ostringstream& ss, size_t width, const flexible_type& t) { switch(t.get_type()) { case flex_type_enum::FLOAT: _print_double(ss, width, t.get<double>()); return; case flex_type_enum::INTEGER: _print_long(ss, width, t.get<flex_int>()); return; case flex_type_enum::STRING: _print_string(ss, width, t.get<flex_string>()); return; default: _print_string(ss, width, std::string(t)); return; } }
void print(std::ostringstream& ss, size_t width) { _print_long(ss, width, value); }