Cod sursa(job #3203206)
| Utilizator | Data | 13 februarie 2024 12:04:57 | |
|---|---|---|---|
| Problema | Sum | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <iostream>
template<int CppVersion, int GccMajor, int GccMinor, int GccPatch>
struct CheckVersions {
static_assert(CppVersion != CppVersion, "Failed to meet version requirements.");
};
int main() {
// This instantiation is designed to fail.
// The compiler error message will include the instantiated template with actual values,
// indirectly showing the versions.
CheckVersions<__cplusplus, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__> check;
return 0;
}
