1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00

turns out only clang understands strongly typed enums

This commit is contained in:
Lars Melchior 2020-04-15 09:08:43 +02:00
parent aa49feeb16
commit e542d9ac53

View file

@ -6,10 +6,7 @@ Greeter::Greeter(std::string _name) : name(_name) {}
std::string Greeter::greet(LanguageCode lang) const {
switch (lang) {
#if defined(_WIN32) || defined(WIN32)
// this silences a MSVC warning as it does not seem to understand strongly-typed enums
default:
#endif
case LanguageCode::EN:
return "Hello, " + name + "!";
case LanguageCode::DE: