#554·EASTL

operator/(duration, duration) has wrong return type

Author: mtnpkeCreated Jan 28, 2025Updated Jan 28, 2025

operator/ with two durations as arguments is implemented to return a duration:

https://github.com/electronicarts/EASTL/blob/7fadbf0da01e6f6e0e7038b1b34343a069b8fc51/include/EASTL/chrono.h#L337-L343

This is wrong; see https://en.cppreference.com/w/cpp/chrono/duration/operator_arith4 (6) - "Note that the return value of this operator is not a duration."

Divison of two durations should return a dimensionless number and not a duration.