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:
parent
a2a6674101
commit
a4881dda8b
3 changed files with 20 additions and 15 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