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
integer type (used as precision specifier - may be both signed and unsigned integer),
sign,
numerator (value of type returned by std :: make_unsigned with first argument passed),
denominator (value of same type as numerator).
This gives two problems. First is that each value is represented in two possible ways. One with signed initial integral type and one with same precision but unsigned one. For example std :: int16_t versus std :: uint16_t or std :: intmax_t versus std :: uintmax_t.
Second, more limiting is that depended type (in this case one returned by std :: make_unsigned) may not be used in signature of nested template.
Therefore simplification would be to interpret first argument directly as type of both numerator and denominator. This largely simplifies ratio template signature. On the other hand passed type must be unsigned integer (one more constrain to be verified).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently ratio takes four elements:
This gives two problems. First is that each value is represented in two possible ways. One with signed initial integral type and one with same precision but unsigned one. For example std :: int16_t versus std :: uint16_t or std :: intmax_t versus std :: uintmax_t.
Second, more limiting is that depended type (in this case one returned by std :: make_unsigned) may not be used in signature of nested template.
Therefore simplification would be to interpret first argument directly as type of both numerator and denominator. This largely simplifies ratio template signature. On the other hand passed type must be unsigned integer (one more constrain to be verified).
Beta Was this translation helpful? Give feedback.
All reactions