c++给数值不给类型能否得出类型

举个例子

输入是一个complex number但是不给type能否通过数值得出type

std::complex 有三个 complex<float>, complex<double>, complex<long double>

如果我只是输入一个complex number但是想要得到其对应的type请问应该怎么做

我现在输入有list,tuple,dict,set,complex都是没有类型要找回对应类型的

 输入 (20,'g',17.5)

返回 tuple <int,char,float>

参看:https://blog.csdn.net/u010154685/article/details/51811023  https://blog.csdn.net/zqxf123456789/article/details/106245816

还有:https://blog.csdn.net/woalss/article/details/100279839