|
CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
|
Concepts | |
| concept | ToStringablePrimitive |
| Concept defining types that can be converted to string using std::to_string. This includes integral types (int, long, etc.) and floating-point types (float, double). Note: std::string and bool are handled separately. | |
Functions | |
| template<ToStringablePrimitive T> | |
| std::string | toString (T value) |
| Converts a primitive value (integral or floating-point) to its string representation. | |
| std::string | toString (bool value) |
| Converts a boolean value to its string representation ("true" or "false"). | |
| std::string | toString (const std::string &value) |
| Converts a string value to its string representation (identity operation). | |
|
nodiscard |
Converts a primitive value (integral or floating-point) to its string representation.
This function uses std::to_string for numeric types. It is designed for primitive types where std::to_string provides the correct formatting.
| T | The type of the value, constrained by ToStringablePrimitive. |
| value | The value to convert. |
Definition at line 38 of file to_string_utils.h.
|
inlinenodiscard |
Converts a boolean value to its string representation ("true" or "false").
This overload handles the special case of boolean conversion, which differs from the numeric behavior of std::to_string.
| value | The boolean value to convert. |
Definition at line 51 of file to_string_utils.h.
|
inlinenodiscard |
Converts a string value to its string representation (identity operation).
This overload handles the case where the input is already a string, returning a copy of the input string.
| value | The string value to convert. |
Definition at line 64 of file to_string_utils.h.