[GCC-XML] Templated classes and default constructors

Jason Roelofs jameskilton at gmail.com
Tue Mar 10 13:06:36 EDT 2009


More of a question and clarification than anything, I'm not sure what
is supposed to happen here:

Using GCCXML build 0.9.0 with GCC 4.1 (build from repository Feb
27th), I've noticed that while regular classes have all of their
generated constructors / destructors / operators included in the XML
now, templated classes do not have any of this.

Given this code:


namespace classes {
  class Adder {

  };

  template<typename T>
  class TemplateAdder {

  };

  typedef TemplateAdder<int> IntAdder;
}


>From Adder, I have:


 <Destructor id="_3154" name="Adder" artificial="1" throw=""
context="_1482" access="public" mangled="_ZN7classes5AdderD1Ev
*INTERNAL* " demangled="classes::Adder::~Adder()" location="f60:8"
file="f60" line="8" endline="8" inline="1">
  </Destructor>
 <Constructor id="_3156" name="Adder" artificial="1" throw=""
context="_1482" access="public" mangled="_ZN7classes5AdderC1ERKS0_
*INTERNAL* " demangled="classes::Adder::Adder(classes::Adder
const&)" location="f60:8" file="f60" line="8" inline="1">
    <Argument type="_3609" location="f60:8" file="f60" line="8"/>
  </Constructor>
  <Constructor id="_3157" name="Adder" explicit="1" context="_1482"
access="public" mangled="_ZN7classes5AdderC1Ev *INTERNAL* "
demangled="classes::Adder::Adder()" location="f60:13" file="f60"
line="13" inline="1"/>
 ...


But for TemplateAdder and IntAdder I have simply:


<Class id="_1480" name="TemplateAdder<int>" context="_60"
incomplete="1" mangled="N7classes13TemplateAdderIiEE"
demangled="classes::TemplateAdder<int>" location="f60:29"
file="f60" line="29" artificial="1" align="8"/>
<Typedef id="_1481" name="IntAdder" type="_1480" context="_60"
location="f60:33" file="f60" line="33"/>


Is this simply what GCC reports back? I can work with this just fine,
I'm just wondering as if I could get generated entries for all classes
it would make this feature I'm working on a little simpler.

Thanks

Jason



More information about the gccxml mailing list