/** * Copyright (c) 2014-present, The osquery authors * * This source code is licensed as defined by the LICENSE file found in the * root directory of this source tree. * * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) */ #include #include #include namespace osquery { class SemanticVersion { public: unsigned major = 0; unsigned minor = 0; unsigned patches = 0; public: static constexpr auto separator = '.'; public: static Expected tryFromString( const std::string& str); }; template inline typename std::enable_if::value, Expected>::type tryTo(const std::string& str) { return SemanticVersion::tryFromString(str); } } // namespace osquery