Initial Course
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <compare>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace cpp20 {
|
||||
|
||||
struct Version {
|
||||
int major;
|
||||
int minor;
|
||||
int patch;
|
||||
|
||||
[[nodiscard]] auto operator<=>(const Version& other) const = default;
|
||||
};
|
||||
|
||||
[[nodiscard]] auto sort_versions(std::vector<Version> versions) -> std::vector<Version>;
|
||||
[[nodiscard]] auto is_sorted_versions(const std::vector<Version>& versions) -> bool;
|
||||
|
||||
} // namespace cpp20
|
||||
Reference in New Issue
Block a user