You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Their common type is not associative because the dimension of the lhs is preferred. Considering how the unit is always of the si rather than cgs, I believe it reasonable to make the dimension of the si, too.
quantity_kind_test.cpp:191:20: error: static assertion failed
191 | static_assert(std::equality_comparable_with<decltype(1 * cgs_cm), decltype(1 * cm)>);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
quantity_kind_test.cpp:191:20: note: constraints not satisfied
In file included from /home/johel/Documents/C++/Forks/mpusz/units/src/src/include/units/bits/external/hacks.h:25,
from /home/johel/Documents/C++/Forks/mpusz/units/src/src/include/units/bits/external/downcasting.h:25,
from /home/johel/Documents/C++/Forks/mpusz/units/src/src/include/units/bits/basic_concepts.h:25,
from /home/johel/Documents/C++/Forks/mpusz/units/src/src/include/units/bits/equivalent.h:25,
from test_tools.h:25,
from quantity_kind_test.cpp:23:
/usr/include/c++/10.2.0/concepts:57:15: required for the satisfaction of ‘__same_as<_Tp, _Up>’ [with _Tp = units::quantity<units::physical::si::cgs::dim_length, units::physical::si::centimetre, int>; _Up = units::quantity<units::physical::si::dim_length, units::physical::si::centimetre, int>]
/usr/include/c++/10.2.0/concepts:62:13: required for the satisfaction of ‘same_as<typename std::common_reference<_Tp1, _Tp2>::type, typename std::common_reference<_Up, _Tp>::type>’ [with _Tp2 = const units::quantity<units::physical::si::dim_length, units::physical::si::centimetre, int>&; _Tp1 = const units::quantity<units::physical::si::cgs::dim_length, units::physical::si::centimetre, int>&; _Tp = const units::quantity<units::physical::si::cgs::dim_length, units::physical::si::centimetre, int>&; _Up = const units::quantity<units::physical::si::dim_length, units::physical::si::centimetre, int>&]
/usr/include/c++/10.2.0/concepts:79:13: required for the satisfaction of ‘common_reference_with<const typename std::remove_reference<_Tp>::type&, const typename std::remove_reference<_Arg>::type&>’ [with _Tp = units::quantity<units::physical::si::cgs::dim_length, units::physical::si::centimetre, int>; _Arg = units::quantity<units::physical::si::dim_length, units::physical::si::centimetre, int>]
/usr/include/c++/10.2.0/concepts:57:32: note: the expression ‘is_same_v<_Tp, _Up> [with _Tp = units::quantity<units::physical::si::cgs::dim_length, units::physical::si::centimetre, int>; _Up = units::quantity<units::physical::si::dim_length, units::physical::si::centimetre, int>]’ evaluated to ‘false’
57 | concept __same_as = std::is_same_v<_Tp, _Up>;
| ~~~~~^~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
The last assertion fails:
Their common type is not associative because the dimension of the lhs is preferred. Considering how the unit is always of the si rather than cgs, I believe it reasonable to make the dimension of the si, too.
The text was updated successfully, but these errors were encountered: