ExchangeFileContents
Loading...
Searching...
No Matches
eut::CompilerInfo Namespace Reference

Returns compiler name, compiler version and whether compiled for 32 or 64 bit. More...

Functions

__tool_export_dll std::string getCompilerInfo ()
 
__tool_export_dll int getCompilerNameAndVersion (std::string &rsCompilerName, std::string &rsCompilerVersion)
 
__tool_export_dll int getEnvBits ()
 
__tool_export_dll std::string getCplusplusVersionAsString ()
 

Detailed Description

Returns compiler name, compiler version and whether compiled for 32 or 64 bit.

Author
Helmut Jakoby

Function Documentation

◆ getCompilerInfo()

__tool_export_dll std::string eut::CompilerInfo::getCompilerInfo ( )

Returns compiler name and version as a std::string.

Returns
The name and the version of the C++ Compilers.

◆ getCompilerNameAndVersion()

__tool_export_dll int eut::CompilerInfo::getCompilerNameAndVersion ( std::string & rsCompilerName,
std::string & rsCompilerVersion )

Returns compiler name and version.

Parameters
[in,out]rsCompilerNameThe name of the C++ Compilers.
[in,out]rsCompilerVersionThe version of the C++ Compilers.
Returns
A return value less than zero indicates an error.

◆ getCplusplusVersionAsString()

__tool_export_dll std::string eut::CompilerInfo::getCplusplusVersionAsString ( )

Returns the current C++ version as string.

Returns
ISO Standard Values:
  • "C++ Vers. unknown" -> __cplusplus < 199711 || > 202002
  • "C++98" -> __cplusplus == 199711
  • "C++11" -> __cplusplus == 201103
  • "C++14" -> __cplusplus == 201402
  • "C++17" -> __cplusplus == 201703
  • "C++20" -> __cplusplus == 202002
See also
https://hackingcpp.com/cpp/std/macro_cplusplus.html

◆ getEnvBits()

__tool_export_dll int eut::CompilerInfo::getEnvBits ( )

Returns whether the C++ code was compiled in 32 or 64 bits.

Returns
if > 0, the environment bits. A return value less than zero indicates an error.