nholthaus / units

a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
http://nholthaus.github.io/units/
MIT License
938 stars 134 forks source link

Compile on MSVC2019 C++17 / C++20 #248

Open vesko99 opened 3 years ago

vesko99 commented 3 years ago

Version 2.3.1 I'm using VS 2019 (16.7.4) Compiler C++17 or C++latest

units.h(3993, 2) : warning C4455 : 'operator ""Llong' : literal suffix identifiers that do not start with an underscore are reserved units.h(3993, 2) : error C2144 : syntax error : 'double' should be preceded by ';' units.h(3993, 2) : error C2473 : 'operator ""Llong' : looks like a function definition, but there is no parameter list. units.h(3993, 2) : error C2737 : 'units::literals::""Llong' : 'constexpr' object must be initialized units.h(3993, 2) : error C2059 : syntax error : 'return' units.h(3993, 2) : warning C4455 : 'operator ""Lunsigned' : literal suffix identifiers that do not start with an underscore are reserved units.h(3993, 2) : error C2144 : syntax error : '__int64' should be preceded by ';' units.h(3993, 2) : error C2473 : 'operator ""Lunsigned' : looks like a function definition, but there is no parameter list. units.h(3993, 2) : error C2737 : 'units::""Lunsigned' : 'constexpr' object must be initialized units.h(3993, 2) : error C2059 : syntax error : '}' units.h(3993, 2) : error C2143 : syntax error : missing ';' before '}' units.h(3993, 2) : error C4430 : missing type specifier - int assumed.Note : C++ does not support default - int units.h(3993, 2) : error C2146 : syntax error : missing ';' before identifier 'femtoliter' units.h(3993, 2) : error C2653 : 'volume' : is not a class or namespace name units.h(3993, 2) : error C2146 : syntax error : missing ';' before identifier 'picoliter' units.h(3993, 2) : error C2146 : syntax error : missing ';' before identifier 'nanoliter' units.h(3993, 2) : error C2146 : syntax error : missing ';' before identifier 'microliter' units.h(3993, 2) : error C2146 : syntax error : missing ';' before identifier 'milliliter' units.h(3993, 2) : error C2146 : syntax error : missing ';' before identifier 'centiliter' units.h(3993, 2) : error C2146 : syntax error : missing ';' before identifier 'deciliter'

nholthaus commented 3 years ago

Thank you! The CI needs to be updated with some more modern compilers.