5 Quantities and units library [quantities]

5.5 Representation [qty.rep]

5.5.3 Customization point objects [qty.rep.cpos]

5.5.3.4 mp_units​::​modulus [qty.modulus.cpo]

The name mp_units​::​modulus denotes a customization point object (N4971, [customization.point.object]).
Given a subexpression E with type T, let t be an lvalue that denotes the reified object for E.
Then:
  • If T does not model WeaklyRegular, mp_units​::​modulus(E) is ill-formed.
  • If auto(t.modulus()) is a valid expression whose type models Scalar, mp_units​::​modulus(E) is expression-equivalent to auto(t.modulus()).
  • Otherwise, if T is a class or enumeration type and auto(modulus(t)) is a valid expression whose type models Scalar where the meaning of modulus is established as-if by performing argument-dependent lookup only (N4971, [basic.lookup.argdep]), then mp_units​::​modulus(E) is expression-equivalent to that expression.
  • If auto(t.abs()) is a valid expression whose type models Scalar, mp_units​::​modulus(E) is expression-equivalent to auto(t.abs()).
  • Otherwise, if T is a class or enumeration type and auto(abs(t)) is a valid expression whose type models Scalar where the meaning of abs is established as-if by performing argument-dependent lookup only (N4971, [basic.lookup.argdep]), then mp_units​::​modulus(E) is expression-equivalent to that expression.
  • Otherwise, mp_units​::​modulus(E) is ill-formed.