partial specialization with dependent name (typename)

前端 未结 2 1747
渐次进展
渐次进展 2021-01-25 11:23

I have the following simple strinToTypeImpl function which converts any kind of string into the template type. The problem I am concerned about is the fact that the

2条回答
  •  广开言路
    2021-01-25 11:49

    This is just another form of the problem that has been discussed many times: There's no one-to-one mapping from types X to types T such that MyMatrix::Vector3 == X.

    Simple example:

    MyMatrix { typedef Vector3 int; };
    MyMatrix { typedef Vector3 int; };
    
    stringToTypeImpl // Help, what is "T"?
    

提交回复
热议问题