If you want to minimize the effect templates take on your compile times, you might be interested in this solution presented here:
https://youtu.be/qYN6eduU06s?t=776.
In short, make containers that operate on data (an array of bytes, pass the size of the data type as parameter) and make template versions of the container that have very simple functions that serve as wrapper for the "non type explicit" container.