Git commit 6ca2eb653242015dff7dc808b714c3e68f6b8fe6 by Alexander Dymo. Committed on 28/10/2012 at 22:07. Pushed by dymo into branch 'master'. Initialize struct members in the constructor, otherwise you need C++11 comp= iler to compile this code M +11 -6 languages/cpp/cppduchain/templateresolver.h http://commits.kde.org/kdevelop/6ca2eb653242015dff7dc808b714c3e68f6b8fe6 diff --git a/languages/cpp/cppduchain/templateresolver.h b/languages/cpp/cp= pduchain/templateresolver.h index 77a2370..518258b 100644 --- a/languages/cpp/cppduchain/templateresolver.h +++ b/languages/cpp/cppduchain/templateresolver.h @@ -52,24 +52,29 @@ class KDEVCPPDUCHAIN_EXPORT TemplateResolver { = struct TemplateMatchType { + TemplateMatchType(): + valid(true), constMatch(false), referenceMatch(false), arrayMatch(= false), + templateArgsMatch(false), pointerMatchDepth(0) + { + } //Whether or not the match is at all valid - bool valid =3D true; + bool valid; //Given a const argument, is the parameter also const? //A non-const argument against a const parameter is not valid // !!!A "const type pointer" argument with a "const type pointer" pa= rameter is NOT valid unless the pointerMatchDepth is the same // !!!Otherwise a "const type pointer" argument will match the close= st "type pointer" depth - bool constMatch =3D false; + bool constMatch; //Given a reference/RValue argument, is the parameter also a referen= ce/RValue? //A non-reference/RValue argument against a reference/RValue paramet= er is not valid - bool referenceMatch =3D false; + bool referenceMatch; //Given a reference argument, is the parameter also a reference? //A non-reference argument against a reference parameter is not valid - bool arrayMatch =3D false; + bool arrayMatch; //Given a template declaration argument, do it and its arguments mat= ch the parameter and its parameters? - bool templateArgsMatch =3D false; + bool templateArgsMatch; //How many of the argument's pointers are matched by the parameter? //An argument with less pointer depth than the parameter is not valid - uint pointerMatchDepth =3D 0; + uint pointerMatchDepth; = uint toUint() {