The mutex-protected variable API only works properly with primitive types. It would be nice for it to also work with structures, objects and containers. Any solution needs to be as efficient as working with the underlying variable directly. We're only looking for a way to add compile-time checks.
This was originally posted on Redmine (https://cdcvs.fnal.gov/redmine/issues/11624).