ambiennt
It would be convenient to have a method that converts a `semver::version<>` to a `std::string` (or `std::wstring`).
#49 · closed · 1 comments
It would be convenient to have a method that converts a `semver::version<>` to a `std::string` (or `std::wstring`).
> It would be convenient to have a method that converts a `semver::version<>` to a `std::string` (or `std::wstring`). sample implementation: ```cpp std::string to_string() const { auto fmt = std::format("{}.{}.{}", this->major(), this->minor(), this->patch()); if (!this->prerelease_tag().empty()) { fmt += "-" + this->prerelease_tag(); } if (!this->build_metadata().empty()) { fmt += "+" + this->build_metadata(); } return fmt; } ```