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
Problem:
std::Xdiv_t can be implemented as {quot, rem} or {rem, quot} (what a mess). This means that structured binding are not unique:
auto [a, b] = std::div(x, y);
is a quot or rem or is b quot or rem ?
is_quotrem_order.hpp
I think this may be overkill: std::div is constexpr from C++23 only making this solution require C++23 as well, but off the top of my head a neater solution might be:
No. There is std::div. Nothing more. Unfortunately, I can't tell you why the C++ committee is not able to do this in a standardized way, let alone provide std::div for unsigned.
Problem:
std::Xdiv_t can be implemented as {quot, rem} or {rem, quot} (what a mess). This means that structured binding are not unique:
auto [a, b] = std::div(x, y);
is a quot or rem or is b quot or rem ?
is_quotrem_order.hpp
The text was updated successfully, but these errors were encountered: