You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These constructors allow for construction from C-strings, `std::string`, and from `std::string_view` when available.
37
+
They construct the value as though calling `from_chars` without a specified format.
38
+
If the input string is invalid these constructors will `throw std::runtime_error`.
39
+
If you are using a no exceptions environment instead of throwing the constructor will return a Quiet NAN.
40
+
41
+
== `to_string`
42
+
43
+
[source, c++]
44
+
----
45
+
#include <boost/decimal/string.hpp>
46
+
47
+
namespace boost {
48
+
namespace decimal {
49
+
50
+
template <typename DecimalType>
51
+
std::string to_string(const DecimalType value)
52
+
53
+
} // namespace decimal
54
+
} // namespace boost
55
+
----
56
+
57
+
The `to_string` format returns a `std::string` of the decimal value formated as though using `to_chars` with general formatting, and no specified precision.
0 commit comments