c++ template casting

后端 未结 7 1213
伪装坚强ぢ
伪装坚强ぢ 2021-01-06 13:48

I\'m a little lost in how to cast templates. I have a function foo which takes a parameter of type ParamVector*. I would like to pass in a P

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-06 14:14

    You are lost because you can't do it - the two types are completely different. Whenever you come across the need for a cast in your code, you should examine both your code and your design very closely - one or both is probably wrong.

提交回复
热议问题