proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
version.hpp
Go to the documentation of this file.
1//
2// Copyright (c) 2022 INRIA
3//
8#ifndef PROXSUITE_HELPERS_VERSION_HPP
9#define PROXSUITE_HELPERS_VERSION_HPP
10
11#include "proxsuite/config.hpp"
12#include <string>
13#include <sstream>
14
15namespace proxsuite {
16namespace helpers {
17
18inline std::string
19printVersion(const std::string& delimiter = ".")
20{
21 std::ostringstream oss;
22 oss << PROXSUITE_MAJOR_VERSION << delimiter << PROXSUITE_MINOR_VERSION
23 << delimiter << PROXSUITE_PATCH_VERSION;
24 return oss.str();
25}
26
27inline bool
28checkVersionAtLeast(signed int major_version,
29 signed int minor_version,
30 signed int patch_version)
31{
32 return PROXSUITE_VERSION_AT_LEAST(
33 major_version, minor_version, patch_version);
34}
35
36} // helpers
37} // proxsuite
38
39#endif // ifndef PROXSUITE_HELPERS_VERSION_HPP
bool checkVersionAtLeast(signed int major_version, signed int minor_version, signed int patch_version)
Definition version.hpp:28
std::string printVersion(const std::string &delimiter=".")
Definition version.hpp:19