TRLC Platform Library  1.0.0
Header-only C++ library for compile-time platform detection and abstraction
trlc::platform::CompilerInfo Struct Reference

Consolidated compiler information structure. More...

#include <trlc/platform/compiler.hpp>

Static Public Member Functions

static bool isAtLeast (const CompilerVersion &min_version) const
 Check if compiler is at least the specified version. More...
 
static bool isGccCompatible () const
 Check if this is a GCC-compatible compiler. More...
 
static bool isClangCompatible () const
 Check if this is a Clang-compatible compiler. More...
 

Public Attributes

CompilerType type
 Detected compiler type. More...
 
CompilerVersion version
 Compiler version information. More...
 
const char * name
 Human-readable compiler name. More...
 
bool has_builtin_attribute
 Supports __has_builtin attributes. More...
 
bool has_inline_assembly
 Supports inline assembly. More...
 
bool has_color_diagnostics
 Supports colored diagnostic output. More...
 

Detailed Description

Consolidated compiler information structure.

This structure aggregates all compiler detection results into a single convenient structure for reporting and analysis purposes.

Definition at line 472 of file compiler.hpp.

Member Function Documentation

◆ isAtLeast()

static bool trlc::platform::CompilerInfo::isAtLeast ( const CompilerVersion min_version) const
inlinestatic

Check if compiler is at least the specified version.

Parameters
min_versionMinimum version to check against
Returns
true if current compiler version is >= min_version

Definition at line 485 of file compiler.hpp.

◆ isClangCompatible()

static bool trlc::platform::CompilerInfo::isClangCompatible ( ) const
inlinestatic

Check if this is a Clang-compatible compiler.

Returns
true if compiler is Clang or Clang-compatible
Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 502 of file compiler.hpp.

◆ isGccCompatible()

static bool trlc::platform::CompilerInfo::isGccCompatible ( ) const
inlinestatic

Check if this is a GCC-compatible compiler.

Returns
true if compiler is GCC or GCC-compatible
Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 493 of file compiler.hpp.

Member Data Documentation

◆ has_builtin_attribute

bool trlc::platform::CompilerInfo::has_builtin_attribute

Supports __has_builtin attributes.

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 476 of file compiler.hpp.

◆ has_color_diagnostics

bool trlc::platform::CompilerInfo::has_color_diagnostics

Supports colored diagnostic output.

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 478 of file compiler.hpp.

◆ has_inline_assembly

bool trlc::platform::CompilerInfo::has_inline_assembly

Supports inline assembly.

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 477 of file compiler.hpp.

◆ name

const char* trlc::platform::CompilerInfo::name

Human-readable compiler name.

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 475 of file compiler.hpp.

◆ type

CompilerType trlc::platform::CompilerInfo::type

Detected compiler type.

Definition at line 473 of file compiler.hpp.

◆ version

CompilerVersion trlc::platform::CompilerInfo::version

Compiler version information.

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 474 of file compiler.hpp.


The documentation for this struct was generated from the following file: