OutpostUniverse / OP2MapImager

Render images of Outpost 2 maps using a Windows based console application.
https://wiki.outpost2.net/doku.php?id=outpost_2:helper_programs:map_imager
1 stars 0 forks source link

Target C++17 instead of C++14 #49

Closed DanRStevens closed 5 years ago

DanRStevens commented 5 years ago

This silences some warnings about the constexpr-if statements recently added to OP2Utility's stream code for zero cost checks for signed/unsigned negative values.

Brett208 commented 5 years ago

Looks good. MSVC does not produce warnings for the constexpr-if statements even though OP2MapImager is not specifically tagged in MSVC as using C++17 features.

DanRStevens commented 5 years ago

I didn't even think about the MSVC project settings. I suppose that should be updated too.

Since the constexpr-if statements were added to the header, which is included in the OP2MapImager project, it does technically make use of C++17 features when being compiled now. If the library changes had been limited to a .cpp file, it might make sense to allow the importing code to still target C++14, but since it's in the .h, we should probably target C++17 in the importing code too.

Brett208 commented 5 years ago

I was more saying that MSVC was happy supporting it without actually setting C++17. Although it doesn't matter to me too much how the project settings are made.