From: Grzegorz J. <ja...@he...> - 2003-11-10 02:53:14
|
On Sun, 9 Nov 2003, yang qu wrote: > Hi! > I am using Opencxx as a C++ parser in my case. In part > of the code, I need to identify an argument type and > generate a new variable using the same type. for > example, we have a function called "void > test(template_arg<16> a);". I need to find the type of > "a", which is "template_arg<16>" in the code, and > generate a new variable with this type. > I tried to use "TypeInfo" to catch the type and use > "TypeInfo::MakePtree()" to generate a new ptree of the > type. but unfortunately, because of the template > specialization, it doesn't work. I got the following > error "MOP error: in TypeInfo::MakePtree(), sorry, > cannot handle this type". > is there any quick fix to my problem? I don't think there is any quick fix. You may try if templates branch handles it properly, but if not, then it most likely needs some work to be done inside OpenC++. If you want to try to make it work I can help. BR Grzegorz ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2003 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |