~ubuntu-branches/ubuntu/wily/aspectc++/wily

« back to all changes in this revision

Viewing changes to Puma/gen-release/step1/src/CTemplateParamInfo.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-06-15 10:17:02 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090615101702-qsr30iptwbxylmo2
Tags: 1.0pre4~svn.20090615-1
* New upstream release.
* don't ignore errors in the postrm script
* avoid spurious creation of empty dir ./usr/sbin/
* improve short descriptions of libpuma-doc and libpuma-dev
* bump Standards-Version to 3.8.1
* bump debhelper compat level to level 7 (latest in stable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
//    CTypeInfo::Destroy (_ValueType);
40
40
}
41
41
 
 
42
bool CTemplateParamInfo::match (const CTemplateParamInfo& tp) const {
 
43
  if (isTemplate () != tp.isTemplate ())
 
44
    return false;
 
45
  if (isTypeParam () != tp.isTypeParam ())
 
46
    return false;
 
47
  if (ValueType () && tp.ValueType () && *ValueType () != *tp.ValueType ())
 
48
    return false;
 
49
 
 
50
  if (isTemplate ()) {
 
51
    CTemplateInfo *t1 = TemplateTemplate ();
 
52
    CTemplateInfo *t2 = tp.TemplateTemplate ();
 
53
    if (! t1 || ! t2 || (t1->Parameters () != t2->Parameters ()))
 
54
      return false;
 
55
    for (unsigned i = 0; i < t1->Parameters (); i++) {
 
56
      if (! t1->Parameter (i)->match (*t2->Parameter (i)))
 
57
        return false;
 
58
    }
 
59
  }
 
60
  return true;
 
61
}
 
62
 
42
63
CT_ExprList *CTemplateParamInfo::DefaultArgument () const { 
43
64
  CTemplateInfo *tpl = _TemplateInfo;
44
65
  int pos = getPosition ();