This appears to require global scope get_with_id() and put_with_id() functions. Shouldn't they be member functions of T instead?