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

enforce standards conformance on MSVC and fix warning flags (#10)

* enforce standards conformance on MSVC

* add \W4 flag for test compilation

* enable compiler warnings for the library target when building tests

* update note on testing frameworks

* turns out only clang understands strongly typed enums
This commit is contained in:
Lars Melchior 2020-04-15 09:12:12 +02:00 committed by GitHub
parent a2a6674101
commit a4881dda8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 15 deletions

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: