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:
Paul Beckingham 2014-09-27 11:51:17 -04:00
parent a3d53b401f
commit b4eed6333a
8 changed files with 23 additions and 0 deletions

View file

@ -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)