I have had to introduce some type wrappers to be able to redefine the + /- operators, and I am concerned about the cost. If I have a wrapper like this:
struct Wrapper<T>(T);
Will the construction and access get completely optimised away by the compiler?
Ideally yes. There is no indirection (pointer) or memory overhead, but there are open bugs like #24963 that mean that there are situations where the wrapper does not optimize equivalently to the underlying type.