@codewiz another thing you could do is define and use your own bound checked literals of different sizes. Here is an example for just plain integers
https://git.sr.ht/~namark/libsimple_support/tree/master/item/source/simple/support/int_literals.hpp
If you stick with just one duration type throughout the codebase that would be all you need, otherwise if you want to mix and match duration of different granularity and size, your custom literals can return a wrapper type that would only be implicitly convertible to durations that they can fit in.
Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.
All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.