Klang C++ 0.7.15
Language Reference (draft)
Loading...
Searching...
No Matches
klang::Version

Klang language version (major.minor.build.debug) More...

#include <klang.h>

Public Member Functions

bool isDebug () const
 
bool atLeast (unsigned char M, unsigned char m, unsigned char b) const
 
bool below (unsigned char M, unsigned char m, unsigned char b) const
 

Public Attributes

unsigned char major
 
unsigned char minor
 
unsigned char build
 
unsigned char extra
 

Detailed Description

Definition at line 138 of file klang.h.

Member Function Documentation

◆ atLeast()

bool klang::Version::atLeast ( unsigned char M,
unsigned char m,
unsigned char b ) const
inline

Definition at line 141 of file klang.h.

141 {
142 return M < major || (M == major && m < minor) || (M == major && m == minor && b <= build);
143 }
unsigned char build
Definition klang.h:139
unsigned char minor
Definition klang.h:139
unsigned char major
Definition klang.h:139

References build, major, and minor.

Referenced by below().

◆ below()

bool klang::Version::below ( unsigned char M,
unsigned char m,
unsigned char b ) const
inline

Definition at line 144 of file klang.h.

144{ return !atLeast(M, m, b); }
bool atLeast(unsigned char M, unsigned char m, unsigned char b) const
Definition klang.h:141

References atLeast().

◆ isDebug()

bool klang::Version::isDebug ( ) const
inline

Definition at line 140 of file klang.h.

140{ return extra & 1; }
unsigned char extra
Definition klang.h:139

References extra.

Member Data Documentation

◆ build

unsigned char klang::Version::build

Definition at line 139 of file klang.h.

Referenced by atLeast().

◆ extra

unsigned char klang::Version::extra

Definition at line 139 of file klang.h.

Referenced by isDebug().

◆ major

unsigned char klang::Version::major

Definition at line 139 of file klang.h.

Referenced by atLeast().

◆ minor

unsigned char klang::Version::minor

Definition at line 139 of file klang.h.

Referenced by atLeast().