mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Diagnostics
- Included C++ compiler compliance level. If 'diag' output is then included in the test suite, we can monitor compliance across platforms, and decide when to use new features.
This commit is contained in:
parent
a3d53b401f
commit
b4eed6333a
8 changed files with 23 additions and 0 deletions
|
@ -134,6 +134,22 @@ int CmdDiagnostics::execute (std::string& output)
|
|||
<< " +l" << 8 * sizeof (long)
|
||||
<< " +vp" << 8 * sizeof (void*)
|
||||
<< " +time_t" << 8 * sizeof (time_t)
|
||||
<< "\n";
|
||||
|
||||
// Compiler compliance level.
|
||||
std::string compliance = "non-compliant";
|
||||
#ifdef __cplusplus
|
||||
int level = __cplusplus;
|
||||
if (level == 199711)
|
||||
compliance = "C++98/03";
|
||||
else if (level == 201103)
|
||||
compliance = "C++11";
|
||||
else
|
||||
compliance = format (level);
|
||||
#endif
|
||||
out << " " << STRING_CMD_DIAG_COMPLIANCE
|
||||
<< ": "
|
||||
<< compliance
|
||||
<< "\n\n";
|
||||
|
||||
out << bold.colorize (STRING_CMD_DIAG_FEATURES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue