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
934 stars 134 forks source link

2.3.3 does not compile #302

Closed nakajimayoshi closed 1 year ago

nakajimayoshi commented 1 year ago

Please include the following information in your issue:

  1. Which version of units you are using 2.3.3
  2. Which compiler exhibited the problem (including compiler version) Microsoft Visual (2022) 17.1.2

IDE Error:

return std::isgreaterequal(static_cast<UNIT_LIB_DEFAULT_TYPE>(lhs), rhs); // Cannot resolve symbol __builtin_isgreaterequal
return std::islessequal(lhs, static_cast<UNIT_LIB_DEFAULT_TYPE>(rhs)); // Cannot resolve symbol __builtin_isgreaterequal

Compiler Error: ` Error LNK2019 unresolved external symbol "protected: class units::unit_t<struct units::unit<struct std::ratio<1,1>,struct units::base_unit<struct std::ratio<2,1>,struct std::ratio<1,1>,struct std::ratio<-3,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1> >,struct std::ratio<0,1>,struct std::ratio<0,1> >,double,struct units::linear_scale> cdecl BatteryRepository::getPower(void)" (?getPower@BatteryRepository@@IEAA?AV?$unit_t@U?$unit@U?$ratio@$00$00@std@@U?$base_unit@U?$ratio@$01$00@std@@U?$ratio@$00$00@2@U?$ratio@$0?2$00@2@U?$ratio@$0A@$00@2@U52@U52@U52@U52@U52@@units@@U?$ratio@$0A@$00@2@U52@@units@@NUlinear_scale@2@@units@@XZ) referenced in function "public: class units::unit_t<struct units::unit<struct std::ratio<1,1>,struct units::base_unit<struct std::ratio<2,1>,struct std::ratio<1,1>,struct std::ratio<-3,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1>,struct std::ratio<0,1> >,struct std::ratio<0,1>,struct std::ratio<0,1> >,double,struct units::linear_scale> cdecl TestBatteryRepository::calculatePower(void)" (?calculatePower@TestBatteryRepository@@QEAA?AV?$unit_t@U?$unit@U?$ratio@$00$00@std@@U?$base_unit@U?$ratio@$01$00@std@@U?$ratio@$00$00@2@U?$ratio@$0?2$00@2@U?$ratio@$0A@$00@2@U52@U52@U52@U52@U52@@units@@U?$ratio@$0A@$00@2@U52@@units@@NUlinear_scale@2@@units@@XZ) Tests C:\Users\dev\source\repos\B78XH-wasm\Tests\TestBatteryRepository.obj 1