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:
parent
aa49feeb16
commit
e542d9ac53
1 changed files with 0 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue