Type emulating a C++ reference better than std::reference_wrapper
I am designing a class that behaves like a C++ references but does some extra instrumental stuff (bookkeeping). Initially I thought that std::reference_wrapper<T> would be a good model. But after a while I realized that std::reference_wrapper<T> doesn't behave, even in principle, as a C++ reference because assignment rebinds the internal pointer. double a = 5.; double b = 3.; double& ref = a; ref = b; assert(&ref != &b); // ref is not bound to b std::reference_wrapper<double> refwpr = a; refwpr = b; assert(&refwpr.get() == &b); // ref wrapper was rebound to b I can of course change that