|
Bash++
Bash++ compiler internal documentation
|
Represents a Bash version to target for code generation. More...
#include <BashVersion.h>
Public Member Functions | |
| constexpr | operator uint32_t () const |
| constexpr bool | operator>= (const BashVersion &other) const |
| constexpr bool | operator<= (const BashVersion &other) const |
| constexpr bool | operator> (const BashVersion &other) const |
| constexpr bool | operator< (const BashVersion &other) const |
| constexpr bool | operator== (const BashVersion &other) const |
| constexpr bool | operator!= (const BashVersion &other) const |
| constexpr std::string | to_string () const |
| constexpr | operator std::string () const |
| constexpr | BashVersion ()=default |
| constexpr | ~BashVersion ()=default |
| constexpr | BashVersion (const BashVersion &)=default |
| constexpr BashVersion & | operator= (const BashVersion &)=default |
| constexpr | BashVersion (BashVersion &&)=default |
| constexpr BashVersion & | operator= (BashVersion &&)=default |
| constexpr | BashVersion (uint16_t major, uint16_t minor) |
| constexpr | BashVersion (std::string_view version_string) |
| Constructs a BashVersion from a string in the format "major.minor" (e.g., "5.2") | |
Public Attributes | |
| uint16_t | major = 5 |
| uint16_t | minor = 2 |
Represents a Bash version to target for code generation.
Copyright (C) 2025 Andrew S. Rightenburg Bash++: Bash with classes Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later)
This struct is used to specify the target Bash version for code generation. It is represented as a single unsigned 32-bit integer for efficient comparison. The high 16 bits represent the major version, and the low 16 bits represent the minor version.
|
constexprdefault |
|
constexprdefault |
|
constexprdefault |
|
constexprdefault |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
Constructs a BashVersion from a string in the format "major.minor" (e.g., "5.2")
Also accepts a string with just the major version (e.g., "5"), in which case the minor version defaults to 0.
| version_string | The version string to parse |
| std::invalid_argument | if the version string is not in a valid format |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
constexprdefault |
|
constexprdefault |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
| uint16_t BashVersion::major = 5 |
| uint16_t BashVersion::minor = 2 |