Open lordylike opened 7 years ago
Hi. Thanks for letting me know. I'll try to have a look at this during the weekend.
In the past (gccxml) default arguments was dump almost as "just a text". "Default argument" can contain arbitrary complex C++ expression evaluated at run time. Dumping such expression was out of scope of gccxml and of pygccxml. You were lucky in this case. I was less lucky in other cases.
I've recently started migrating from gccxml to castxml and have encountered the aforementioned problem. I could narrow the problem down to a minimum example that still fails:
Called with following cmd line arguments:
-std=c++14 -c -x c++ --castxml-cc-msvc "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe" --castxml-gccxml -o "test.xml" "test.h"
Produces an xml with following argument tag:
The information referring to the (Type)0.0 default argument given can be found within the (type-parameter-0-0) information found in the Argument tag default coupled with the Class referenced in the Method's context information, which states:
From these two places, I would expect gccxml to figure out that the default argument should be written as
(float)0.
. Instead it parses this to(type-parameter-0-0)0.
.