internal ClassScopeFunctionSpecializationDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_ClassScopeFunctionSpecialization)
        {
            _specialization = new Lazy <CXXMethodDecl>(() => TranslationUnit.GetOrCreate <CXXMethodDecl>(Handle.GetSpecialization(0)));
            _templateArgs   = new Lazy <IReadOnlyList <TemplateArgumentLoc> >(() => {
                var templateArgCount = Handle.NumTemplateArguments;
                var templateArgs     = new List <TemplateArgumentLoc>(templateArgCount);

                for (int i = 0; i < templateArgCount; i++)
                {
                    var templateArg = new TemplateArgumentLoc(this, unchecked ((uint)i));
                    templateArgs.Add(templateArg);
                }

                return(templateArgs);
            });
        }
Exemple #2
0
 internal TemplateTemplateParmDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_TemplateTemplateParameter, CX_DeclKind.CX_DeclKind_TemplateTemplateParm)
 {
     _defaultArgument = new TemplateArgumentLoc(this, 0);
 }