Type erased reference wrapper that allows generic assignment, is that possible?

后端 未结 0 982
逝去的感伤
逝去的感伤 2020-12-21 03:35

Is it possible to create a class that stores a reference to variable of any type and allows generic assignment (with value of a distinct type)?

Imagine this interface

相关标签:
回答
  • 消灭零回复
提交回复
热议问题