diff --git a/src/AST/ASTVisitor.cs b/src/AST/ASTVisitor.cs
index 6346c0de..00f502bb 100644
--- a/src/AST/ASTVisitor.cs
+++ b/src/AST/ASTVisitor.cs
@@ -466,6 +466,27 @@ namespace CppSharp.AST
return specialization.SpecializedFunction.Visit(this);
}
+ public bool VisitVarTemplateDecl(VarTemplate template)
+ {
+ if (!VisitDeclaration(template))
+ return false;
+
+ foreach (var templateParameter in template.Parameters)
+ templateParameter.Visit(this);
+
+ foreach (var specialization in template.Specializations)
+ specialization.Visit(this);
+
+ template.TemplatedVariable.Visit(this);
+
+ return true;
+ }
+
+ public bool VisitVarTemplateSpecializationDecl(VarTemplateSpecialization specialization)
+ {
+ return VisitVariableDecl(specialization);
+ }
+
public virtual bool VisitMacroDefinition(MacroDefinition macro)
{
return false;
diff --git a/src/AST/Declaration.cs b/src/AST/Declaration.cs
index 04402b32..105bbc1d 100644
--- a/src/AST/Declaration.cs
+++ b/src/AST/Declaration.cs
@@ -419,6 +419,8 @@ namespace CppSharp.AST
T VisitClassTemplateSpecializationDecl(ClassTemplateSpecialization specialization);
T VisitFunctionTemplateDecl(FunctionTemplate template);
T VisitFunctionTemplateSpecializationDecl(FunctionTemplateSpecialization specialization);
+ T VisitVarTemplateDecl(VarTemplate template);
+ T VisitVarTemplateSpecializationDecl(VarTemplateSpecialization template);
T VisitTemplateTemplateParameterDecl(TemplateTemplateParameter templateTemplateParameter);
T VisitTemplateParameterDecl(TypeTemplateParameter templateParameter);
T VisitNonTypeTemplateParameterDecl(NonTypeTemplateParameter nonTypeTemplateParameter);
diff --git a/src/AST/Template.cs b/src/AST/Template.cs
index b0cea88c..33eb3506 100644
--- a/src/AST/Template.cs
+++ b/src/AST/Template.cs
@@ -378,4 +378,58 @@ namespace CppSharp.AST
return visitor.VisitFunctionTemplateSpecializationDecl(this);
}
}
+
+ ///
+ /// Represents a declaration of a variable template.
+ ///
+ public class VarTemplate : Template
+ {
+ public List Specializations;
+
+ public Variable TemplatedVariable
+ {
+ get { return TemplatedDecl as Variable; }
+ }
+
+ public VarTemplate()
+ {
+ Specializations = new List();
+ }
+
+ public VarTemplate(Variable var) : base(var)
+ {
+ Specializations = new List();
+ }
+
+ public override T Visit(IDeclVisitor visitor)
+ {
+ return visitor.VisitVarTemplateDecl(this);
+ }
+ }
+
+ ///
+ /// Represents a var template specialization, which refers to a var
+ /// template with a given set of template arguments.
+ ///
+ public class VarTemplateSpecialization : Variable
+ {
+ public VarTemplate TemplatedDecl;
+
+ public List Arguments;
+
+ public TemplateSpecializationKind SpecializationKind;
+
+ public VarTemplateSpecialization()
+ {
+ Arguments = new List();
+ }
+ }
+
+ ///
+ /// Represents a variable template partial specialization, which refers to
+ /// a variable template with a given partial set of template arguments.
+ ///
+ public class VarTemplatePartialSpecialization : VarTemplateSpecialization
+ {
+ }
}
diff --git a/src/Core/Parser/ASTConverter.cs b/src/Core/Parser/ASTConverter.cs
index 52539678..52c290c0 100644
--- a/src/Core/Parser/ASTConverter.cs
+++ b/src/Core/Parser/ASTConverter.cs
@@ -147,6 +147,11 @@ namespace CppSharp
public abstract TRet VisitClassTemplatePartialSpecialization(
ClassTemplatePartialSpecialization decl);
public abstract TRet VisitFunctionTemplate(FunctionTemplate decl);
+ public abstract TRet VisitVarTemplate(VarTemplate decl);
+ public abstract TRet VisitVarTemplateSpecialization(
+ VarTemplateSpecialization decl);
+ public abstract TRet VisitVarTemplatePartialSpecialization(
+ VarTemplatePartialSpecialization decl);
public abstract TRet VisitTemplateTemplateParameter(TemplateTemplateParameter decl);
public abstract TRet VisitTypeTemplateParameter(TypeTemplateParameter decl);
public abstract TRet VisitNonTypeTemplateParameter(NonTypeTemplateParameter decl);
@@ -1278,13 +1283,18 @@ namespace CppSharp
return _item;
}
- public override AST.Declaration VisitVariable(Variable decl)
+ public void VisitVariable(Variable decl, AST.Variable _variable)
{
- var _variable = new AST.Variable();
VisitDeclaration(decl, _variable);
_variable.Mangled = decl.Mangled;
_variable.QualifiedType = typeConverter.VisitQualified(
decl.QualifiedType);
+ }
+
+ public override AST.Declaration VisitVariable(Variable decl)
+ {
+ var _variable = new AST.Variable();
+ VisitVariable(decl, _variable);
return _variable;
}
@@ -1656,6 +1666,48 @@ namespace CppSharp
return _spec;
}
+ public override AST.Declaration VisitVarTemplate(VarTemplate decl)
+ {
+ var _decl = new AST.VarTemplate();
+ VisitTemplate(decl, _decl);
+ for (uint i = 0; i < decl.SpecializationsCount; ++i)
+ {
+ var spec = decl.getSpecializations(i);
+ var _spec = (AST.VarTemplateSpecialization)Visit(spec);
+ _decl.Specializations.Add(_spec);
+ }
+ return _decl;
+ }
+
+ public override AST.Declaration VisitVarTemplateSpecialization(
+ VarTemplateSpecialization decl)
+ {
+ var _decl = new AST.VarTemplateSpecialization();
+ VisitVarTemplateSpecialization(decl, _decl);
+ return _decl;
+ }
+
+ private void VisitVarTemplateSpecialization(VarTemplateSpecialization decl, AST.VarTemplateSpecialization _decl)
+ {
+ VisitVariable(decl, _decl);
+ _decl.SpecializationKind = VisitSpecializationKind(decl.SpecializationKind);
+ _decl.TemplatedDecl = (AST.VarTemplate)Visit(decl.TemplatedDecl);
+ for (uint i = 0; i < decl.ArgumentsCount; ++i)
+ {
+ var arg = decl.getArguments(i);
+ var _arg = VisitTemplateArgument(arg);
+ _decl.Arguments.Add(_arg);
+ }
+ }
+
+ public override AST.Declaration VisitVarTemplatePartialSpecialization(
+ VarTemplatePartialSpecialization decl)
+ {
+ var _decl = new AST.VarTemplatePartialSpecialization();
+ VisitVarTemplateSpecialization(decl, _decl);
+ return _decl;
+ }
+
void VisitPreprocessedEntity(PreprocessedEntity entity, AST.PreprocessedEntity _entity)
{
if (PreprocessedEntities.ContainsKey(entity.__Instance))
diff --git a/src/CppParser/AST.cpp b/src/CppParser/AST.cpp
index 3daa6ef5..af911a54 100644
--- a/src/CppParser/AST.cpp
+++ b/src/CppParser/AST.cpp
@@ -6,7 +6,6 @@
************************************************************************/
#include "AST.h"
-#include
#include
#include
#include
@@ -785,6 +784,52 @@ FunctionTemplateSpecialization::~FunctionTemplateSpecialization()
DEF_VECTOR(FunctionTemplateSpecialization, TemplateArgument, Arguments)
+VarTemplate::VarTemplate() : Template(DeclarationKind::VarTemplate) {}
+
+VarTemplate::~VarTemplate() {}
+
+DEF_VECTOR(VarTemplate, VarTemplateSpecialization*, Specializations)
+
+VarTemplateSpecialization* VarTemplate::FindSpecialization(const std::string& usr)
+{
+ auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(),
+ [&](VarTemplateSpecialization* cts) { return cts->USR == usr; });
+
+ if (foundSpec != Specializations.end())
+ return static_cast(*foundSpec);
+
+ return nullptr;
+}
+
+VarTemplatePartialSpecialization* VarTemplate::FindPartialSpecialization(const std::string& usr)
+{
+ auto foundSpec = FindSpecialization(usr);
+ if (foundSpec != nullptr)
+ return static_cast(foundSpec);
+ return nullptr;
+}
+
+VarTemplateSpecialization::VarTemplateSpecialization()
+ : Variable()
+ , TemplatedDecl(0)
+{
+ Kind = DeclarationKind::VarTemplateSpecialization;
+}
+
+VarTemplateSpecialization::~VarTemplateSpecialization() {}
+
+DEF_VECTOR(VarTemplateSpecialization, TemplateArgument, Arguments)
+
+VarTemplatePartialSpecialization::VarTemplatePartialSpecialization()
+ : VarTemplateSpecialization()
+{
+ Kind = DeclarationKind::VarTemplatePartialSpecialization;
+}
+
+VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization()
+{
+}
+
Namespace::Namespace()
: DeclarationContext(DeclarationKind::Namespace)
, IsInline(false)
diff --git a/src/CppParser/AST.h b/src/CppParser/AST.h
index 63174acb..a87fe2d3 100644
--- a/src/CppParser/AST.h
+++ b/src/CppParser/AST.h
@@ -9,6 +9,7 @@
#include "Helpers.h"
#include "Sources.h"
+#include
namespace CppSharp { namespace CppParser { namespace AST {
@@ -400,7 +401,10 @@ enum class DeclarationKind
Friend,
TemplateTemplateParm,
TemplateTypeParm,
- NonTypeTemplateParm
+ NonTypeTemplateParm,
+ VarTemplate,
+ VarTemplateSpecialization,
+ VarTemplatePartialSpecialization,
};
#define DECLARE_DECL_KIND(klass, kind) \
@@ -503,18 +507,6 @@ public:
bool IsAnonymous;
};
-template
-T* DeclarationContext::FindTemplate(const std::string& USR)
-{
- auto foundTemplate = std::find_if(Templates.begin(), Templates.end(),
- [&](Template* t) { return t->USR == USR; });
-
- if (foundTemplate != Templates.end())
- return static_cast(*foundTemplate);
-
- return nullptr;
-}
-
class CS_API TypedefNameDecl : public Declaration
{
public:
@@ -824,6 +816,18 @@ public:
VECTOR(Declaration*, Parameters)
};
+template
+T* DeclarationContext::FindTemplate(const std::string& USR)
+{
+ auto foundTemplate = std::find_if(Templates.begin(), Templates.end(),
+ [&](Template* t) { return t->USR == USR; });
+
+ if (foundTemplate != Templates.end())
+ return static_cast(*foundTemplate);
+
+ return nullptr;
+}
+
class CS_API TypeAliasTemplate : public Template
{
public:
@@ -934,6 +938,36 @@ public:
TemplateSpecializationKind SpecializationKind;
};
+class VarTemplateSpecialization;
+class VarTemplatePartialSpecialization;
+
+class CS_API VarTemplate : public Template
+{
+public:
+ VarTemplate();
+ ~VarTemplate();
+ VECTOR(VarTemplateSpecialization*, Specializations)
+ VarTemplateSpecialization* FindSpecialization(const std::string& usr);
+ VarTemplatePartialSpecialization* FindPartialSpecialization(const std::string& usr);
+};
+
+class CS_API VarTemplateSpecialization : public Variable
+{
+public:
+ VarTemplateSpecialization();
+ ~VarTemplateSpecialization();
+ VarTemplate* TemplatedDecl;
+ VECTOR(TemplateArgument, Arguments)
+ TemplateSpecializationKind SpecializationKind;
+};
+
+class CS_API VarTemplatePartialSpecialization : public VarTemplateSpecialization
+{
+public:
+ VarTemplatePartialSpecialization();
+ ~VarTemplatePartialSpecialization();
+};
+
class CS_API Namespace : public DeclarationContext
{
public:
diff --git a/src/CppParser/Bindings/CLI/AST.cpp b/src/CppParser/Bindings/CLI/AST.cpp
index 4b61d378..43ef9bb8 100644
--- a/src/CppParser/Bindings/CLI/AST.cpp
+++ b/src/CppParser/Bindings/CLI/AST.cpp
@@ -4484,6 +4484,189 @@ void CppSharp::Parser::AST::FunctionTemplateSpecialization::SpecializationKind::
((::CppSharp::CppParser::AST::FunctionTemplateSpecialization*)NativePtr)->SpecializationKind = (::CppSharp::CppParser::AST::TemplateSpecializationKind)value;
}
+CppSharp::Parser::AST::VarTemplate::VarTemplate(::CppSharp::CppParser::AST::VarTemplate* native)
+ : CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*)native)
+{
+}
+
+CppSharp::Parser::AST::VarTemplate^ CppSharp::Parser::AST::VarTemplate::__CreateInstance(::System::IntPtr native)
+{
+ return gcnew ::CppSharp::Parser::AST::VarTemplate((::CppSharp::CppParser::AST::VarTemplate*) native.ToPointer());
+}
+
+CppSharp::Parser::AST::VarTemplate::~VarTemplate()
+{
+ if (NativePtr)
+ {
+ auto __nativePtr = NativePtr;
+ NativePtr = 0;
+ delete (::CppSharp::CppParser::AST::VarTemplate*) __nativePtr;
+ }
+}
+
+CppSharp::Parser::AST::VarTemplate::VarTemplate()
+ : CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*)nullptr)
+{
+ __ownsNativeInstance = true;
+ NativePtr = new ::CppSharp::CppParser::AST::VarTemplate();
+}
+
+CppSharp::Parser::AST::VarTemplateSpecialization^ CppSharp::Parser::AST::VarTemplate::getSpecializations(unsigned int i)
+{
+ auto __ret = ((::CppSharp::CppParser::AST::VarTemplate*)NativePtr)->getSpecializations(i);
+ if (__ret == nullptr) return nullptr;
+ return (__ret == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::VarTemplateSpecialization((::CppSharp::CppParser::AST::VarTemplateSpecialization*)__ret);
+}
+
+void CppSharp::Parser::AST::VarTemplate::addSpecializations(CppSharp::Parser::AST::VarTemplateSpecialization^ s)
+{
+ if (ReferenceEquals(s, nullptr))
+ throw gcnew ::System::ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ auto __arg0 = (::CppSharp::CppParser::AST::VarTemplateSpecialization*)s->NativePtr;
+ ((::CppSharp::CppParser::AST::VarTemplate*)NativePtr)->addSpecializations(__arg0);
+}
+
+void CppSharp::Parser::AST::VarTemplate::clearSpecializations()
+{
+ ((::CppSharp::CppParser::AST::VarTemplate*)NativePtr)->clearSpecializations();
+}
+
+CppSharp::Parser::AST::VarTemplate::VarTemplate(CppSharp::Parser::AST::VarTemplate^ _0)
+ : CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*)nullptr)
+{
+ __ownsNativeInstance = true;
+ if (ReferenceEquals(_0, nullptr))
+ throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ auto &__arg0 = *(::CppSharp::CppParser::AST::VarTemplate*)_0->NativePtr;
+ NativePtr = new ::CppSharp::CppParser::AST::VarTemplate(__arg0);
+}
+
+unsigned int CppSharp::Parser::AST::VarTemplate::SpecializationsCount::get()
+{
+ auto __ret = ((::CppSharp::CppParser::AST::VarTemplate*)NativePtr)->getSpecializationsCount();
+ return __ret;
+}
+
+CppSharp::Parser::AST::VarTemplateSpecialization::VarTemplateSpecialization(::CppSharp::CppParser::AST::VarTemplateSpecialization* native)
+ : CppSharp::Parser::AST::Variable((::CppSharp::CppParser::AST::Variable*)native)
+{
+}
+
+CppSharp::Parser::AST::VarTemplateSpecialization^ CppSharp::Parser::AST::VarTemplateSpecialization::__CreateInstance(::System::IntPtr native)
+{
+ return gcnew ::CppSharp::Parser::AST::VarTemplateSpecialization((::CppSharp::CppParser::AST::VarTemplateSpecialization*) native.ToPointer());
+}
+
+CppSharp::Parser::AST::VarTemplateSpecialization::~VarTemplateSpecialization()
+{
+ if (NativePtr)
+ {
+ auto __nativePtr = NativePtr;
+ NativePtr = 0;
+ delete (::CppSharp::CppParser::AST::VarTemplateSpecialization*) __nativePtr;
+ }
+}
+
+CppSharp::Parser::AST::VarTemplateSpecialization::VarTemplateSpecialization()
+ : CppSharp::Parser::AST::Variable((::CppSharp::CppParser::AST::Variable*)nullptr)
+{
+ __ownsNativeInstance = true;
+ NativePtr = new ::CppSharp::CppParser::AST::VarTemplateSpecialization();
+}
+
+CppSharp::Parser::AST::TemplateArgument^ CppSharp::Parser::AST::VarTemplateSpecialization::getArguments(unsigned int i)
+{
+ auto __ret = ((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->getArguments(i);
+ auto ____ret = new ::CppSharp::CppParser::AST::TemplateArgument(__ret);
+ return (____ret == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::TemplateArgument((::CppSharp::CppParser::AST::TemplateArgument*)____ret);
+}
+
+void CppSharp::Parser::AST::VarTemplateSpecialization::addArguments(CppSharp::Parser::AST::TemplateArgument^ s)
+{
+ if (ReferenceEquals(s, nullptr))
+ throw gcnew ::System::ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ auto &__arg0 = *(::CppSharp::CppParser::AST::TemplateArgument*)s->NativePtr;
+ ((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->addArguments(__arg0);
+}
+
+void CppSharp::Parser::AST::VarTemplateSpecialization::clearArguments()
+{
+ ((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->clearArguments();
+}
+
+CppSharp::Parser::AST::VarTemplateSpecialization::VarTemplateSpecialization(CppSharp::Parser::AST::VarTemplateSpecialization^ _0)
+ : CppSharp::Parser::AST::Variable((::CppSharp::CppParser::AST::Variable*)nullptr)
+{
+ __ownsNativeInstance = true;
+ if (ReferenceEquals(_0, nullptr))
+ throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ auto &__arg0 = *(::CppSharp::CppParser::AST::VarTemplateSpecialization*)_0->NativePtr;
+ NativePtr = new ::CppSharp::CppParser::AST::VarTemplateSpecialization(__arg0);
+}
+
+unsigned int CppSharp::Parser::AST::VarTemplateSpecialization::ArgumentsCount::get()
+{
+ auto __ret = ((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->getArgumentsCount();
+ return __ret;
+}
+
+CppSharp::Parser::AST::VarTemplate^ CppSharp::Parser::AST::VarTemplateSpecialization::TemplatedDecl::get()
+{
+ return (((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->TemplatedDecl == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::VarTemplate((::CppSharp::CppParser::AST::VarTemplate*)((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->TemplatedDecl);
+}
+
+void CppSharp::Parser::AST::VarTemplateSpecialization::TemplatedDecl::set(CppSharp::Parser::AST::VarTemplate^ value)
+{
+ ((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->TemplatedDecl = (::CppSharp::CppParser::AST::VarTemplate*)value->NativePtr;
+}
+
+CppSharp::Parser::AST::TemplateSpecializationKind CppSharp::Parser::AST::VarTemplateSpecialization::SpecializationKind::get()
+{
+ return (CppSharp::Parser::AST::TemplateSpecializationKind)((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->SpecializationKind;
+}
+
+void CppSharp::Parser::AST::VarTemplateSpecialization::SpecializationKind::set(CppSharp::Parser::AST::TemplateSpecializationKind value)
+{
+ ((::CppSharp::CppParser::AST::VarTemplateSpecialization*)NativePtr)->SpecializationKind = (::CppSharp::CppParser::AST::TemplateSpecializationKind)value;
+}
+
+CppSharp::Parser::AST::VarTemplatePartialSpecialization::VarTemplatePartialSpecialization(::CppSharp::CppParser::AST::VarTemplatePartialSpecialization* native)
+ : CppSharp::Parser::AST::VarTemplateSpecialization((::CppSharp::CppParser::AST::VarTemplateSpecialization*)native)
+{
+}
+
+CppSharp::Parser::AST::VarTemplatePartialSpecialization^ CppSharp::Parser::AST::VarTemplatePartialSpecialization::__CreateInstance(::System::IntPtr native)
+{
+ return gcnew ::CppSharp::Parser::AST::VarTemplatePartialSpecialization((::CppSharp::CppParser::AST::VarTemplatePartialSpecialization*) native.ToPointer());
+}
+
+CppSharp::Parser::AST::VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization()
+{
+ if (NativePtr)
+ {
+ auto __nativePtr = NativePtr;
+ NativePtr = 0;
+ delete (::CppSharp::CppParser::AST::VarTemplatePartialSpecialization*) __nativePtr;
+ }
+}
+
+CppSharp::Parser::AST::VarTemplatePartialSpecialization::VarTemplatePartialSpecialization()
+ : CppSharp::Parser::AST::VarTemplateSpecialization((::CppSharp::CppParser::AST::VarTemplateSpecialization*)nullptr)
+{
+ __ownsNativeInstance = true;
+ NativePtr = new ::CppSharp::CppParser::AST::VarTemplatePartialSpecialization();
+}
+
+CppSharp::Parser::AST::VarTemplatePartialSpecialization::VarTemplatePartialSpecialization(CppSharp::Parser::AST::VarTemplatePartialSpecialization^ _0)
+ : CppSharp::Parser::AST::VarTemplateSpecialization((::CppSharp::CppParser::AST::VarTemplateSpecialization*)nullptr)
+{
+ __ownsNativeInstance = true;
+ if (ReferenceEquals(_0, nullptr))
+ throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ auto &__arg0 = *(::CppSharp::CppParser::AST::VarTemplatePartialSpecialization*)_0->NativePtr;
+ NativePtr = new ::CppSharp::CppParser::AST::VarTemplatePartialSpecialization(__arg0);
+}
+
CppSharp::Parser::AST::Namespace::Namespace(::CppSharp::CppParser::AST::Namespace* native)
: CppSharp::Parser::AST::DeclarationContext((::CppSharp::CppParser::AST::DeclarationContext*)native)
{
diff --git a/src/CppParser/Bindings/CLI/AST.h b/src/CppParser/Bindings/CLI/AST.h
index 644abe98..5b39a290 100644
--- a/src/CppParser/Bindings/CLI/AST.h
+++ b/src/CppParser/Bindings/CLI/AST.h
@@ -102,6 +102,9 @@ namespace CppSharp
ref class VFTableInfo;
ref class VTableComponent;
ref class VTableLayout;
+ ref class VarTemplate;
+ ref class VarTemplatePartialSpecialization;
+ ref class VarTemplateSpecialization;
ref class Variable;
ref class VerbatimBlockComment;
ref class VerbatimBlockLineComment;
@@ -164,7 +167,10 @@ namespace CppSharp
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
- NonTypeTemplateParm = 26
+ NonTypeTemplateParm = 26,
+ VarTemplate = 27,
+ VarTemplateSpecialization = 28,
+ VarTemplatePartialSpecialization = 29
};
public enum struct AccessSpecifier
@@ -2537,6 +2543,79 @@ namespace CppSharp
bool __ownsNativeInstance;
};
+ public ref class VarTemplate : CppSharp::Parser::AST::Template
+ {
+ public:
+
+ VarTemplate(::CppSharp::CppParser::AST::VarTemplate* native);
+ static VarTemplate^ __CreateInstance(::System::IntPtr native);
+ VarTemplate();
+
+ VarTemplate(CppSharp::Parser::AST::VarTemplate^ _0);
+
+ ~VarTemplate();
+
+ property unsigned int SpecializationsCount
+ {
+ unsigned int get();
+ }
+
+ CppSharp::Parser::AST::VarTemplateSpecialization^ getSpecializations(unsigned int i);
+
+ void addSpecializations(CppSharp::Parser::AST::VarTemplateSpecialization^ s);
+
+ void clearSpecializations();
+ };
+
+ public ref class VarTemplateSpecialization : CppSharp::Parser::AST::Variable
+ {
+ public:
+
+ VarTemplateSpecialization(::CppSharp::CppParser::AST::VarTemplateSpecialization* native);
+ static VarTemplateSpecialization^ __CreateInstance(::System::IntPtr native);
+ VarTemplateSpecialization();
+
+ VarTemplateSpecialization(CppSharp::Parser::AST::VarTemplateSpecialization^ _0);
+
+ ~VarTemplateSpecialization();
+
+ property unsigned int ArgumentsCount
+ {
+ unsigned int get();
+ }
+
+ property CppSharp::Parser::AST::VarTemplate^ TemplatedDecl
+ {
+ CppSharp::Parser::AST::VarTemplate^ get();
+ void set(CppSharp::Parser::AST::VarTemplate^);
+ }
+
+ property CppSharp::Parser::AST::TemplateSpecializationKind SpecializationKind
+ {
+ CppSharp::Parser::AST::TemplateSpecializationKind get();
+ void set(CppSharp::Parser::AST::TemplateSpecializationKind);
+ }
+
+ CppSharp::Parser::AST::TemplateArgument^ getArguments(unsigned int i);
+
+ void addArguments(CppSharp::Parser::AST::TemplateArgument^ s);
+
+ void clearArguments();
+ };
+
+ public ref class VarTemplatePartialSpecialization : CppSharp::Parser::AST::VarTemplateSpecialization
+ {
+ public:
+
+ VarTemplatePartialSpecialization(::CppSharp::CppParser::AST::VarTemplatePartialSpecialization* native);
+ static VarTemplatePartialSpecialization^ __CreateInstance(::System::IntPtr native);
+ VarTemplatePartialSpecialization();
+
+ VarTemplatePartialSpecialization(CppSharp::Parser::AST::VarTemplatePartialSpecialization^ _0);
+
+ ~VarTemplatePartialSpecialization();
+ };
+
public ref class Namespace : CppSharp::Parser::AST::DeclarationContext
{
public:
diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs
index bc80f0e7..cb8e3b8a 100644
--- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs
+++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs
@@ -62,7 +62,10 @@ namespace CppSharp
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
- NonTypeTemplateParm = 26
+ NonTypeTemplateParm = 26,
+ VarTemplate = 27,
+ VarTemplateSpecialization = 28,
+ VarTemplatePartialSpecialization = 29
}
public enum AccessSpecifier
@@ -10841,6 +10844,565 @@ namespace CppSharp
}
}
+ public unsafe partial class VarTemplate : global::CppSharp.Parser.AST.Template, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 120)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(12)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(16)]
+ public int LineNumberStart;
+
+ [FieldOffset(20)]
+ public int LineNumberEnd;
+
+ [FieldOffset(24)]
+ public global::std.__1.basic_string.Internal Name;
+
+ [FieldOffset(36)]
+ public global::std.__1.basic_string.Internal USR;
+
+ [FieldOffset(48)]
+ public global::std.__1.basic_string.Internal DebugText;
+
+ [FieldOffset(60)]
+ public byte IsIncomplete;
+
+ [FieldOffset(61)]
+ public byte IsDependent;
+
+ [FieldOffset(62)]
+ public byte IsImplicit;
+
+ [FieldOffset(64)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(68)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(84)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(88)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(92)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18getSpecializationsEj")]
+ internal static extern global::System.IntPtr getSpecializations_0(global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18addSpecializationsERPNS1_25VarTemplateSpecializationE")]
+ internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate20clearSpecializationsEv")]
+ internal static extern void clearSpecializations_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate23getSpecializationsCountEv")]
+ internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplate(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplate __CreateInstance(VarTemplate.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplate(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplate.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(120);
+ global::CppSharp.Parser.AST.VarTemplate.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplate(VarTemplate.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplate(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplate()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(120);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(120);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplateSpecialization getSpecializations(uint i)
+ {
+ var __ret = Internal.getSpecializations_0((__Instance + __PointerAdjustment), i);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
+ if (__ret == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
+ return __result0;
+ }
+
+ public void addSpecializations(global::CppSharp.Parser.AST.VarTemplateSpecialization s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addSpecializations_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearSpecializations()
+ {
+ Internal.clearSpecializations_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint SpecializationsCount
+ {
+ get
+ {
+ var __ret = Internal.getSpecializationsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplateSpecialization : global::CppSharp.Parser.AST.Variable, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 132)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(12)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(16)]
+ public int LineNumberStart;
+
+ [FieldOffset(20)]
+ public int LineNumberEnd;
+
+ [FieldOffset(24)]
+ public global::std.__1.basic_string.Internal Name;
+
+ [FieldOffset(36)]
+ public global::std.__1.basic_string.Internal USR;
+
+ [FieldOffset(48)]
+ public global::std.__1.basic_string.Internal DebugText;
+
+ [FieldOffset(60)]
+ public byte IsIncomplete;
+
+ [FieldOffset(61)]
+ public byte IsDependent;
+
+ [FieldOffset(62)]
+ public byte IsImplicit;
+
+ [FieldOffset(64)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(68)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(84)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(88)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(92)]
+ public global::std.__1.basic_string.Internal Mangled;
+
+ [FieldOffset(104)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(128)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12getArgumentsEj")]
+ internal static extern void getArguments_0(global::System.IntPtr @return, global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12addArgumentsERNS1_16TemplateArgumentE")]
+ internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization14clearArgumentsEv")]
+ internal static extern void clearArguments_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization17getArgumentsCountEv")]
+ internal static extern uint getArgumentsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplateSpecialization __CreateInstance(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplateSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(132);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplateSpecialization(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplateSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplateSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(132);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(132);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.TemplateArgument getArguments(uint i)
+ {
+ var __ret = new global::CppSharp.Parser.AST.TemplateArgument.Internal();
+ Internal.getArguments_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), i);
+ return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
+ }
+
+ public void addArguments(global::CppSharp.Parser.AST.TemplateArgument s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addArguments_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearArguments()
+ {
+ Internal.clearArguments_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint ArgumentsCount
+ {
+ get
+ {
+ var __ret = Internal.getArgumentsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplate TemplatedDecl
+ {
+ get
+ {
+ global::CppSharp.Parser.AST.VarTemplate __result0;
+ if (((Internal*) __Instance)->TemplatedDecl == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TemplatedDecl))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplate) global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap[((Internal*) __Instance)->TemplatedDecl];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplate.__CreateInstance(((Internal*) __Instance)->TemplatedDecl);
+ return __result0;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->TemplatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
+ {
+ get
+ {
+ return ((Internal*) __Instance)->SpecializationKind;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->SpecializationKind = value;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplatePartialSpecialization : global::CppSharp.Parser.AST.VarTemplateSpecialization, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 132)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(12)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(16)]
+ public int LineNumberStart;
+
+ [FieldOffset(20)]
+ public int LineNumberEnd;
+
+ [FieldOffset(24)]
+ public global::std.__1.basic_string.Internal Name;
+
+ [FieldOffset(36)]
+ public global::std.__1.basic_string.Internal USR;
+
+ [FieldOffset(48)]
+ public global::std.__1.basic_string.Internal DebugText;
+
+ [FieldOffset(60)]
+ public byte IsIncomplete;
+
+ [FieldOffset(61)]
+ public byte IsDependent;
+
+ [FieldOffset(62)]
+ public byte IsImplicit;
+
+ [FieldOffset(64)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(68)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(84)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(88)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(92)]
+ public global::std.__1.basic_string.Internal Mangled;
+
+ [FieldOffset(104)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(128)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplatePartialSpecialization __CreateInstance(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplatePartialSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(132);
+ global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplatePartialSpecialization(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplatePartialSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplatePartialSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(132);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(132);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
public unsafe partial class Namespace : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 216)]
diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.dll-templates.cpp b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.dll-templates.cpp
new file mode 100644
index 00000000..021e4448
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.dll-templates.cpp
@@ -0,0 +1,29 @@
+#include
+#include
+#include
+
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std-templates.cpp b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std-templates.cpp
new file mode 100644
index 00000000..205042ac
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std-templates.cpp
@@ -0,0 +1,4 @@
+#include
+
+template class __declspec(dllexport) std::allocator;
+template class __declspec(dllexport) std::basic_string, std::allocator>;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs
new file mode 100644
index 00000000..b833fa4c
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs
@@ -0,0 +1,701 @@
+//----------------------------------------------------------------------------
+//
+// This is autogenerated code by CppSharp.
+// Do not edit this file or all your changes will be lost after re-generation.
+//
+//----------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace std
+{
+ namespace __1
+ {
+ public unsafe partial class allocator : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public unsafe partial struct Internal
+ {
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSt3__19allocatorIcEC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new allocator(native.ToPointer(), skipVTables);
+ }
+
+ public static allocator __CreateInstance(allocator.Internal native, bool skipVTables = false)
+ {
+ return new allocator(native, skipVTables);
+ }
+
+ private static void* __CopyValue(allocator.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(0);
+ *(allocator.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private allocator(allocator.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected allocator(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public allocator()
+ {
+ __Instance = Marshal.AllocHGlobal(0);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __destruct_n
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public uint size;
+ }
+ }
+
+ public unsafe partial class bad_weak_ptr
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr vptr_exception;
+ }
+ }
+
+ public unsafe abstract partial class __shared_count
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr vptr___shared_count;
+
+ [FieldOffset(4)]
+ public int __shared_owners_;
+ }
+ }
+
+ public unsafe abstract partial class __shared_weak_count
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr vptr___shared_count;
+
+ [FieldOffset(4)]
+ public int __shared_owners_;
+
+ [FieldOffset(8)]
+ public int __shared_weak_owners_;
+ }
+ }
+
+ public unsafe partial class __sp_mut
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr __lx;
+ }
+ }
+
+ public unsafe partial class pointer_safety
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ namespace __pointer_type_imp
+ {
+ }
+ }
+}
+
+namespace std
+{
+ namespace __1
+ {
+ public unsafe partial class basic_string : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public unsafe partial struct Internal
+ {
+ [FieldOffset(0)]
+ public uint __cap_;
+
+ [FieldOffset(4)]
+ public uint __size_;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr __data_;
+
+ [FieldOffset(0)]
+ public byte __size_1;
+
+ [FieldOffset(0)]
+ public sbyte __lx;
+
+ [FieldOffset(1)]
+ public fixed sbyte __data_1[11];
+
+ [FieldOffset(2)]
+ public sbyte __dummy___data_1_1;
+
+ [FieldOffset(3)]
+ public sbyte __dummy___data_1_2;
+
+ [FieldOffset(4)]
+ public sbyte __dummy___data_1_3;
+
+ [FieldOffset(5)]
+ public sbyte __dummy___data_1_4;
+
+ [FieldOffset(6)]
+ public sbyte __dummy___data_1_5;
+
+ [FieldOffset(7)]
+ public sbyte __dummy___data_1_6;
+
+ [FieldOffset(8)]
+ public sbyte __dummy___data_1_7;
+
+ [FieldOffset(9)]
+ public sbyte __dummy___data_1_8;
+
+ [FieldOffset(10)]
+ public sbyte __dummy___data_1_9;
+
+ [FieldOffset(11)]
+ public sbyte __dummy___data_1_10;
+
+ [FieldOffset(0)]
+ public fixed uint __words[3];
+
+ [FieldOffset(4)]
+ public uint __dummy___words_1;
+
+ [FieldOffset(8)]
+ public uint __dummy___words_2;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv")]
+ internal static extern global::System.IntPtr c_str_0(global::System.IntPtr instance);
+ }
+
+ internal enum short_mask : uint
+ {
+ __short_mask = 0x1
+ }
+
+ internal enum long_mask : uint
+ {
+ __long_mask = 0x1
+ }
+
+ internal enum min_cap : uint
+ {
+ __min_cap = 11
+ }
+
+ internal enum n_words : uint
+ {
+ __n_words = 3
+ }
+
+ [Flags]
+ internal enum alignment : uint
+ {
+ __alignment = 16
+ }
+
+ public unsafe partial class __rep : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Internal
+ {
+ }
+
+ public unsafe partial struct _
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __rep __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __rep(native.ToPointer(), skipVTables);
+ }
+
+ public static __rep __CreateInstance(__rep.Internal native, bool skipVTables = false)
+ {
+ return new __rep(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__rep.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(12);
+ *(__rep.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __rep(__rep.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __rep(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __rep()
+ {
+ __Instance = Marshal.AllocHGlobal(12);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__rep __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __long : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public uint __cap_;
+
+ [FieldOffset(4)]
+ public uint __size_;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr __data_;
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __long __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __long(native.ToPointer(), skipVTables);
+ }
+
+ public static __long __CreateInstance(__long.Internal native, bool skipVTables = false)
+ {
+ return new __long(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__long.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(12);
+ *(__long.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __long(__long.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __long(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __long()
+ {
+ __Instance = Marshal.AllocHGlobal(12);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__long __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __short : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Internal
+ {
+ [FieldOffset(1)]
+ public fixed sbyte __data_[11];
+
+ [FieldOffset(2)]
+ public sbyte __dummy___data__1;
+
+ [FieldOffset(3)]
+ public sbyte __dummy___data__2;
+
+ [FieldOffset(4)]
+ public sbyte __dummy___data__3;
+
+ [FieldOffset(5)]
+ public sbyte __dummy___data__4;
+
+ [FieldOffset(6)]
+ public sbyte __dummy___data__5;
+
+ [FieldOffset(7)]
+ public sbyte __dummy___data__6;
+
+ [FieldOffset(8)]
+ public sbyte __dummy___data__7;
+
+ [FieldOffset(9)]
+ public sbyte __dummy___data__8;
+
+ [FieldOffset(10)]
+ public sbyte __dummy___data__9;
+
+ [FieldOffset(11)]
+ public sbyte __dummy___data__10;
+ }
+
+ public unsafe partial struct _
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 1)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public byte __size_;
+
+ [FieldOffset(0)]
+ public sbyte __lx;
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __short __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __short(native.ToPointer(), skipVTables);
+ }
+
+ public static __short __CreateInstance(__short.Internal native, bool skipVTables = false)
+ {
+ return new __short(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__short.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(12);
+ *(__short.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __short(__short.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __short(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __short()
+ {
+ __Instance = Marshal.AllocHGlobal(12);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__short __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __raw : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public fixed uint __words[3];
+
+ [FieldOffset(4)]
+ public uint __dummy___words_1;
+
+ [FieldOffset(8)]
+ public uint __dummy___words_2;
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __raw __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __raw(native.ToPointer(), skipVTables);
+ }
+
+ public static __raw __CreateInstance(__raw.Internal native, bool skipVTables = false)
+ {
+ return new __raw(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__raw.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(12);
+ *(__raw.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __raw(__raw.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __raw(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __raw()
+ {
+ __Instance = Marshal.AllocHGlobal(12);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__raw __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial struct __ulx
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Internal
+ {
+ }
+
+ private __ulx.Internal __instance;
+ public __ulx.Internal __Instance { get { return __instance; } }
+
+ public static __ulx __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __ulx(native.ToPointer(), skipVTables);
+ }
+
+ public static __ulx __CreateInstance(__ulx.Internal native, bool skipVTables = false)
+ {
+ return new __ulx(native, skipVTables);
+ }
+
+ private __ulx(__ulx.Internal native, bool skipVTables = false)
+ : this()
+ {
+ __instance = native;
+ }
+
+ private __ulx(void* native, bool skipVTables = false) : this()
+ {
+ __instance = *(Internal*) native;
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static basic_string __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new basic_string(native.ToPointer(), skipVTables);
+ }
+
+ public static basic_string __CreateInstance(basic_string.Internal native, bool skipVTables = false)
+ {
+ return new basic_string(native, skipVTables);
+ }
+
+ private static void* __CopyValue(basic_string.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(12);
+ *(basic_string.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private basic_string(basic_string.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected basic_string(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public string c_str()
+ {
+ var __ret = Internal.c_str_0((__Instance + __PointerAdjustment));
+ return Marshal.PtrToStringAnsi(__ret);
+ }
+
+ public static uint npos
+ {
+ get
+ {
+ var __ptr = (uint*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE");
+ return *__ptr;
+ }
+ }
+ }
+ }
+}
diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs
index bc5ce6de..2967b8aa 100644
--- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs
+++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs
@@ -62,7 +62,10 @@ namespace CppSharp
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
- NonTypeTemplateParm = 26
+ NonTypeTemplateParm = 26,
+ VarTemplate = 27,
+ VarTemplateSpecialization = 28,
+ VarTemplatePartialSpecialization = 29
}
public enum AccessSpecifier
@@ -10841,6 +10844,565 @@ namespace CppSharp
}
}
+ public unsafe partial class VarTemplate : global::CppSharp.Parser.AST.Template, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 156)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(12)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(16)]
+ public int LineNumberStart;
+
+ [FieldOffset(20)]
+ public int LineNumberEnd;
+
+ [FieldOffset(24)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(48)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(72)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(96)]
+ public byte IsIncomplete;
+
+ [FieldOffset(97)]
+ public byte IsDependent;
+
+ [FieldOffset(98)]
+ public byte IsImplicit;
+
+ [FieldOffset(100)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(104)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(120)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(124)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(128)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??0VarTemplate@AST@CppParser@CppSharp@@QAE@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??0VarTemplate@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
+ internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??1VarTemplate@AST@CppParser@CppSharp@@QAE@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?getSpecializations@VarTemplate@AST@CppParser@CppSharp@@QAEPAVVarTemplateSpecialization@234@I@Z")]
+ internal static extern global::System.IntPtr getSpecializations_0(global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?addSpecializations@VarTemplate@AST@CppParser@CppSharp@@QAEXAAPAVVarTemplateSpecialization@234@@Z")]
+ internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?clearSpecializations@VarTemplate@AST@CppParser@CppSharp@@QAEXXZ")]
+ internal static extern void clearSpecializations_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?getSpecializationsCount@VarTemplate@AST@CppParser@CppSharp@@QAEIXZ")]
+ internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplate(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplate __CreateInstance(VarTemplate.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplate(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplate.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(156);
+ global::CppSharp.Parser.AST.VarTemplate.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplate(VarTemplate.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplate(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplate()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(156);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(156);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplateSpecialization getSpecializations(uint i)
+ {
+ var __ret = Internal.getSpecializations_0((__Instance + __PointerAdjustment), i);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
+ if (__ret == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
+ return __result0;
+ }
+
+ public void addSpecializations(global::CppSharp.Parser.AST.VarTemplateSpecialization s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addSpecializations_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearSpecializations()
+ {
+ Internal.clearSpecializations_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint SpecializationsCount
+ {
+ get
+ {
+ var __ret = Internal.getSpecializationsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplateSpecialization : global::CppSharp.Parser.AST.Variable, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 180)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(12)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(16)]
+ public int LineNumberStart;
+
+ [FieldOffset(20)]
+ public int LineNumberEnd;
+
+ [FieldOffset(24)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(48)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(72)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(96)]
+ public byte IsIncomplete;
+
+ [FieldOffset(97)]
+ public byte IsDependent;
+
+ [FieldOffset(98)]
+ public byte IsImplicit;
+
+ [FieldOffset(100)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(104)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(120)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(124)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(128)]
+ public global::std.basic_string.Internal Mangled;
+
+ [FieldOffset(152)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(160)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(176)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??0VarTemplateSpecialization@AST@CppParser@CppSharp@@QAE@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??0VarTemplateSpecialization@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
+ internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??1VarTemplateSpecialization@AST@CppParser@CppSharp@@QAE@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?getArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QAE?AUTemplateArgument@234@I@Z")]
+ internal static extern void getArguments_0(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?addArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QAEXAAUTemplateArgument@234@@Z")]
+ internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?clearArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QAEXXZ")]
+ internal static extern void clearArguments_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?getArgumentsCount@VarTemplateSpecialization@AST@CppParser@CppSharp@@QAEIXZ")]
+ internal static extern uint getArgumentsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplateSpecialization __CreateInstance(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplateSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(180);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplateSpecialization(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplateSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplateSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(180);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(180);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.TemplateArgument getArguments(uint i)
+ {
+ var __ret = new global::CppSharp.Parser.AST.TemplateArgument.Internal();
+ Internal.getArguments_0((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
+ return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
+ }
+
+ public void addArguments(global::CppSharp.Parser.AST.TemplateArgument s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addArguments_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearArguments()
+ {
+ Internal.clearArguments_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint ArgumentsCount
+ {
+ get
+ {
+ var __ret = Internal.getArgumentsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplate TemplatedDecl
+ {
+ get
+ {
+ global::CppSharp.Parser.AST.VarTemplate __result0;
+ if (((Internal*) __Instance)->TemplatedDecl == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TemplatedDecl))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplate) global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap[((Internal*) __Instance)->TemplatedDecl];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplate.__CreateInstance(((Internal*) __Instance)->TemplatedDecl);
+ return __result0;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->TemplatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
+ {
+ get
+ {
+ return ((Internal*) __Instance)->SpecializationKind;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->SpecializationKind = value;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplatePartialSpecialization : global::CppSharp.Parser.AST.VarTemplateSpecialization, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 180)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(12)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(16)]
+ public int LineNumberStart;
+
+ [FieldOffset(20)]
+ public int LineNumberEnd;
+
+ [FieldOffset(24)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(48)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(72)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(96)]
+ public byte IsIncomplete;
+
+ [FieldOffset(97)]
+ public byte IsDependent;
+
+ [FieldOffset(98)]
+ public byte IsImplicit;
+
+ [FieldOffset(100)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(104)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(120)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(124)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(128)]
+ public global::std.basic_string.Internal Mangled;
+
+ [FieldOffset(152)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(160)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(176)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??0VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAE@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??0VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
+ internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??1VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAE@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+ }
+
+ public static new VarTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplatePartialSpecialization __CreateInstance(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplatePartialSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(180);
+ global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplatePartialSpecialization(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplatePartialSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplatePartialSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(180);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(180);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
public unsafe partial class Namespace : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 252)]
diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.dll-templates.cpp b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.dll-templates.cpp
new file mode 100644
index 00000000..d4bedc95
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.dll-templates.cpp
@@ -0,0 +1,30 @@
+#include
+#include
+#include
+
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-templates.cpp b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-templates.cpp
new file mode 100644
index 00000000..205042ac
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-templates.cpp
@@ -0,0 +1,4 @@
+#include
+
+template class __declspec(dllexport) std::allocator;
+template class __declspec(dllexport) std::basic_string, std::allocator>;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs
new file mode 100644
index 00000000..d5203b33
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs
@@ -0,0 +1,317 @@
+//----------------------------------------------------------------------------
+//
+// This is autogenerated code by CppSharp.
+// Do not edit this file or all your changes will be lost after re-generation.
+//
+//----------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace std
+{
+ public unsafe partial class allocator : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public unsafe partial struct Internal
+ {
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??0?$allocator@D@std@@QAE@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new allocator(native.ToPointer(), skipVTables);
+ }
+
+ public static allocator __CreateInstance(allocator.Internal native, bool skipVTables = false)
+ {
+ return new allocator(native, skipVTables);
+ }
+
+ private static void* __CopyValue(allocator.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(0);
+ *(allocator.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private allocator(allocator.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected allocator(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public allocator()
+ {
+ __Instance = Marshal.AllocHGlobal(0);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class _Alloc_allocate
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_construct
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_destroy
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_max_size
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_select
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+}
+
+namespace std
+{
+ public unsafe partial class basic_string : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public unsafe partial struct Internal
+ {
+ [FieldOffset(0)]
+ public fixed sbyte _Buf[16];
+
+ [FieldOffset(1)]
+ public sbyte __dummy__Buf_1;
+
+ [FieldOffset(2)]
+ public sbyte __dummy__Buf_2;
+
+ [FieldOffset(3)]
+ public sbyte __dummy__Buf_3;
+
+ [FieldOffset(4)]
+ public sbyte __dummy__Buf_4;
+
+ [FieldOffset(5)]
+ public sbyte __dummy__Buf_5;
+
+ [FieldOffset(6)]
+ public sbyte __dummy__Buf_6;
+
+ [FieldOffset(7)]
+ public sbyte __dummy__Buf_7;
+
+ [FieldOffset(8)]
+ public sbyte __dummy__Buf_8;
+
+ [FieldOffset(9)]
+ public sbyte __dummy__Buf_9;
+
+ [FieldOffset(10)]
+ public sbyte __dummy__Buf_10;
+
+ [FieldOffset(11)]
+ public sbyte __dummy__Buf_11;
+
+ [FieldOffset(12)]
+ public sbyte __dummy__Buf_12;
+
+ [FieldOffset(13)]
+ public sbyte __dummy__Buf_13;
+
+ [FieldOffset(14)]
+ public sbyte __dummy__Buf_14;
+
+ [FieldOffset(15)]
+ public sbyte __dummy__Buf_15;
+
+ [FieldOffset(0)]
+ public global::System.IntPtr _Ptr;
+
+ [FieldOffset(0)]
+ public fixed sbyte _Alias[16];
+
+ [FieldOffset(1)]
+ public sbyte __dummy__Alias_1;
+
+ [FieldOffset(2)]
+ public sbyte __dummy__Alias_2;
+
+ [FieldOffset(3)]
+ public sbyte __dummy__Alias_3;
+
+ [FieldOffset(4)]
+ public sbyte __dummy__Alias_4;
+
+ [FieldOffset(5)]
+ public sbyte __dummy__Alias_5;
+
+ [FieldOffset(6)]
+ public sbyte __dummy__Alias_6;
+
+ [FieldOffset(7)]
+ public sbyte __dummy__Alias_7;
+
+ [FieldOffset(8)]
+ public sbyte __dummy__Alias_8;
+
+ [FieldOffset(9)]
+ public sbyte __dummy__Alias_9;
+
+ [FieldOffset(10)]
+ public sbyte __dummy__Alias_10;
+
+ [FieldOffset(11)]
+ public sbyte __dummy__Alias_11;
+
+ [FieldOffset(12)]
+ public sbyte __dummy__Alias_12;
+
+ [FieldOffset(13)]
+ public sbyte __dummy__Alias_13;
+
+ [FieldOffset(14)]
+ public sbyte __dummy__Alias_14;
+
+ [FieldOffset(15)]
+ public sbyte __dummy__Alias_15;
+
+ [FieldOffset(16)]
+ public uint _Mysize;
+
+ [FieldOffset(20)]
+ public uint _Myres;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
+ EntryPoint="?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ")]
+ internal static extern global::System.IntPtr c_str_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static basic_string __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new basic_string(native.ToPointer(), skipVTables);
+ }
+
+ public static basic_string __CreateInstance(basic_string.Internal native, bool skipVTables = false)
+ {
+ return new basic_string(native, skipVTables);
+ }
+
+ private static void* __CopyValue(basic_string.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(basic_string.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private basic_string(basic_string.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected basic_string(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.basic_string __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public string c_str()
+ {
+ var __ret = Internal.c_str_0((__Instance + __PointerAdjustment));
+ return Marshal.PtrToStringAnsi(__ret);
+ }
+
+ public static uint npos
+ {
+ get
+ {
+ var __ptr = (uint*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB");
+ return *__ptr;
+ }
+ }
+ }
+}
diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs
index 42606594..4bc3a794 100644
--- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs
+++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs
@@ -62,7 +62,10 @@ namespace CppSharp
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
- NonTypeTemplateParm = 26
+ NonTypeTemplateParm = 26,
+ VarTemplate = 27,
+ VarTemplateSpecialization = 28,
+ VarTemplatePartialSpecialization = 29
}
public enum AccessSpecifier
@@ -10840,6 +10843,565 @@ namespace CppSharp
}
}
+ public unsafe partial class VarTemplate : global::CppSharp.Parser.AST.Template, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 224)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.__1.basic_string.Internal Name;
+
+ [FieldOffset(56)]
+ public global::std.__1.basic_string.Internal USR;
+
+ [FieldOffset(80)]
+ public global::std.__1.basic_string.Internal DebugText;
+
+ [FieldOffset(104)]
+ public byte IsIncomplete;
+
+ [FieldOffset(105)]
+ public byte IsDependent;
+
+ [FieldOffset(106)]
+ public byte IsImplicit;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(120)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(152)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(160)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(168)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18getSpecializationsEj")]
+ internal static extern global::System.IntPtr getSpecializations_0(global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18addSpecializationsERPNS1_25VarTemplateSpecializationE")]
+ internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate20clearSpecializationsEv")]
+ internal static extern void clearSpecializations_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate23getSpecializationsCountEv")]
+ internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplate(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplate __CreateInstance(VarTemplate.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplate(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplate.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(224);
+ global::CppSharp.Parser.AST.VarTemplate.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplate(VarTemplate.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplate(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplate()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(224);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(224);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplateSpecialization getSpecializations(uint i)
+ {
+ var __ret = Internal.getSpecializations_0((__Instance + __PointerAdjustment), i);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
+ if (__ret == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
+ return __result0;
+ }
+
+ public void addSpecializations(global::CppSharp.Parser.AST.VarTemplateSpecialization s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addSpecializations_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearSpecializations()
+ {
+ Internal.clearSpecializations_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint SpecializationsCount
+ {
+ get
+ {
+ var __ret = Internal.getSpecializationsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplateSpecialization : global::CppSharp.Parser.AST.Variable, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 248)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.__1.basic_string.Internal Name;
+
+ [FieldOffset(56)]
+ public global::std.__1.basic_string.Internal USR;
+
+ [FieldOffset(80)]
+ public global::std.__1.basic_string.Internal DebugText;
+
+ [FieldOffset(104)]
+ public byte IsIncomplete;
+
+ [FieldOffset(105)]
+ public byte IsDependent;
+
+ [FieldOffset(106)]
+ public byte IsImplicit;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(120)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(152)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(160)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(168)]
+ public global::std.__1.basic_string.Internal Mangled;
+
+ [FieldOffset(192)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(208)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(240)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12getArgumentsEj")]
+ internal static extern void getArguments_0(global::System.IntPtr @return, global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12addArgumentsERNS1_16TemplateArgumentE")]
+ internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization14clearArgumentsEv")]
+ internal static extern void clearArguments_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization17getArgumentsCountEv")]
+ internal static extern uint getArgumentsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplateSpecialization __CreateInstance(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplateSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(248);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplateSpecialization(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplateSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplateSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.TemplateArgument getArguments(uint i)
+ {
+ var __ret = new global::CppSharp.Parser.AST.TemplateArgument.Internal();
+ Internal.getArguments_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), i);
+ return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
+ }
+
+ public void addArguments(global::CppSharp.Parser.AST.TemplateArgument s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addArguments_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearArguments()
+ {
+ Internal.clearArguments_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint ArgumentsCount
+ {
+ get
+ {
+ var __ret = Internal.getArgumentsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplate TemplatedDecl
+ {
+ get
+ {
+ global::CppSharp.Parser.AST.VarTemplate __result0;
+ if (((Internal*) __Instance)->TemplatedDecl == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TemplatedDecl))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplate) global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap[((Internal*) __Instance)->TemplatedDecl];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplate.__CreateInstance(((Internal*) __Instance)->TemplatedDecl);
+ return __result0;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->TemplatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
+ {
+ get
+ {
+ return ((Internal*) __Instance)->SpecializationKind;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->SpecializationKind = value;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplatePartialSpecialization : global::CppSharp.Parser.AST.VarTemplateSpecialization, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 248)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.__1.basic_string.Internal Name;
+
+ [FieldOffset(56)]
+ public global::std.__1.basic_string.Internal USR;
+
+ [FieldOffset(80)]
+ public global::std.__1.basic_string.Internal DebugText;
+
+ [FieldOffset(104)]
+ public byte IsIncomplete;
+
+ [FieldOffset(105)]
+ public byte IsDependent;
+
+ [FieldOffset(106)]
+ public byte IsImplicit;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(120)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(152)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(160)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(168)]
+ public global::std.__1.basic_string.Internal Mangled;
+
+ [FieldOffset(192)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(208)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(240)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplatePartialSpecialization __CreateInstance(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplatePartialSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(248);
+ global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplatePartialSpecialization(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplatePartialSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplatePartialSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
public unsafe partial class Namespace : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 416)]
diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.dll-templates.cpp b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.dll-templates.cpp
new file mode 100644
index 00000000..021e4448
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.dll-templates.cpp
@@ -0,0 +1,29 @@
+#include
+#include
+#include
+
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std-templates.cpp b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std-templates.cpp
new file mode 100644
index 00000000..205042ac
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std-templates.cpp
@@ -0,0 +1,4 @@
+#include
+
+template class __declspec(dllexport) std::allocator;
+template class __declspec(dllexport) std::basic_string, std::allocator>;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs
new file mode 100644
index 00000000..4171e0b3
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs
@@ -0,0 +1,773 @@
+//----------------------------------------------------------------------------
+//
+// This is autogenerated code by CppSharp.
+// Do not edit this file or all your changes will be lost after re-generation.
+//
+//----------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace std
+{
+ namespace __1
+ {
+ public unsafe partial class allocator : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public unsafe partial struct Internal
+ {
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSt3__19allocatorIcEC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new allocator(native.ToPointer(), skipVTables);
+ }
+
+ public static allocator __CreateInstance(allocator.Internal native, bool skipVTables = false)
+ {
+ return new allocator(native, skipVTables);
+ }
+
+ private static void* __CopyValue(allocator.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(0);
+ *(allocator.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private allocator(allocator.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected allocator(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public allocator()
+ {
+ __Instance = Marshal.AllocHGlobal(0);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __destruct_n
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public ulong size;
+ }
+ }
+
+ public unsafe partial class bad_weak_ptr
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr vptr_exception;
+ }
+ }
+
+ public unsafe abstract partial class __shared_count
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr vptr___shared_count;
+
+ [FieldOffset(8)]
+ public long __shared_owners_;
+ }
+ }
+
+ public unsafe abstract partial class __shared_weak_count
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr vptr___shared_count;
+
+ [FieldOffset(8)]
+ public long __shared_owners_;
+
+ [FieldOffset(16)]
+ public long __shared_weak_owners_;
+ }
+ }
+
+ public unsafe partial class __sp_mut
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr __lx;
+ }
+ }
+
+ public unsafe partial class pointer_safety
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ namespace __pointer_type_imp
+ {
+ }
+ }
+}
+
+namespace std
+{
+ namespace __1
+ {
+ public unsafe partial class basic_string : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public unsafe partial struct Internal
+ {
+ [FieldOffset(0)]
+ public ulong __cap_;
+
+ [FieldOffset(8)]
+ public ulong __size_;
+
+ [FieldOffset(16)]
+ public global::System.IntPtr __data_;
+
+ [FieldOffset(0)]
+ public byte __size_1;
+
+ [FieldOffset(0)]
+ public sbyte __lx;
+
+ [FieldOffset(1)]
+ public fixed sbyte __data_1[23];
+
+ [FieldOffset(2)]
+ public sbyte __dummy___data_1_1;
+
+ [FieldOffset(3)]
+ public sbyte __dummy___data_1_2;
+
+ [FieldOffset(4)]
+ public sbyte __dummy___data_1_3;
+
+ [FieldOffset(5)]
+ public sbyte __dummy___data_1_4;
+
+ [FieldOffset(6)]
+ public sbyte __dummy___data_1_5;
+
+ [FieldOffset(7)]
+ public sbyte __dummy___data_1_6;
+
+ [FieldOffset(8)]
+ public sbyte __dummy___data_1_7;
+
+ [FieldOffset(9)]
+ public sbyte __dummy___data_1_8;
+
+ [FieldOffset(10)]
+ public sbyte __dummy___data_1_9;
+
+ [FieldOffset(11)]
+ public sbyte __dummy___data_1_10;
+
+ [FieldOffset(12)]
+ public sbyte __dummy___data_1_11;
+
+ [FieldOffset(13)]
+ public sbyte __dummy___data_1_12;
+
+ [FieldOffset(14)]
+ public sbyte __dummy___data_1_13;
+
+ [FieldOffset(15)]
+ public sbyte __dummy___data_1_14;
+
+ [FieldOffset(16)]
+ public sbyte __dummy___data_1_15;
+
+ [FieldOffset(17)]
+ public sbyte __dummy___data_1_16;
+
+ [FieldOffset(18)]
+ public sbyte __dummy___data_1_17;
+
+ [FieldOffset(19)]
+ public sbyte __dummy___data_1_18;
+
+ [FieldOffset(20)]
+ public sbyte __dummy___data_1_19;
+
+ [FieldOffset(21)]
+ public sbyte __dummy___data_1_20;
+
+ [FieldOffset(22)]
+ public sbyte __dummy___data_1_21;
+
+ [FieldOffset(23)]
+ public sbyte __dummy___data_1_22;
+
+ [FieldOffset(0)]
+ public fixed ulong __words[3];
+
+ [FieldOffset(8)]
+ public ulong __dummy___words_1;
+
+ [FieldOffset(16)]
+ public ulong __dummy___words_2;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv")]
+ internal static extern global::System.IntPtr c_str_0(global::System.IntPtr instance);
+ }
+
+ internal enum short_mask : uint
+ {
+ __short_mask = 0x1
+ }
+
+ internal enum long_mask : uint
+ {
+ __long_mask = 0x1
+ }
+
+ internal enum min_cap : uint
+ {
+ __min_cap = 23
+ }
+
+ internal enum n_words : uint
+ {
+ __n_words = 3
+ }
+
+ [Flags]
+ internal enum alignment : uint
+ {
+ __alignment = 16
+ }
+
+ public unsafe partial class __rep : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ }
+
+ public unsafe partial struct _
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __rep __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __rep(native.ToPointer(), skipVTables);
+ }
+
+ public static __rep __CreateInstance(__rep.Internal native, bool skipVTables = false)
+ {
+ return new __rep(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__rep.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(__rep.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __rep(__rep.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __rep(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __rep()
+ {
+ __Instance = Marshal.AllocHGlobal(24);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__rep __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __long : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public ulong __cap_;
+
+ [FieldOffset(8)]
+ public ulong __size_;
+
+ [FieldOffset(16)]
+ public global::System.IntPtr __data_;
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __long __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __long(native.ToPointer(), skipVTables);
+ }
+
+ public static __long __CreateInstance(__long.Internal native, bool skipVTables = false)
+ {
+ return new __long(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__long.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(__long.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __long(__long.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __long(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __long()
+ {
+ __Instance = Marshal.AllocHGlobal(24);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__long __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __short : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ [FieldOffset(1)]
+ public fixed sbyte __data_[23];
+
+ [FieldOffset(2)]
+ public sbyte __dummy___data__1;
+
+ [FieldOffset(3)]
+ public sbyte __dummy___data__2;
+
+ [FieldOffset(4)]
+ public sbyte __dummy___data__3;
+
+ [FieldOffset(5)]
+ public sbyte __dummy___data__4;
+
+ [FieldOffset(6)]
+ public sbyte __dummy___data__5;
+
+ [FieldOffset(7)]
+ public sbyte __dummy___data__6;
+
+ [FieldOffset(8)]
+ public sbyte __dummy___data__7;
+
+ [FieldOffset(9)]
+ public sbyte __dummy___data__8;
+
+ [FieldOffset(10)]
+ public sbyte __dummy___data__9;
+
+ [FieldOffset(11)]
+ public sbyte __dummy___data__10;
+
+ [FieldOffset(12)]
+ public sbyte __dummy___data__11;
+
+ [FieldOffset(13)]
+ public sbyte __dummy___data__12;
+
+ [FieldOffset(14)]
+ public sbyte __dummy___data__13;
+
+ [FieldOffset(15)]
+ public sbyte __dummy___data__14;
+
+ [FieldOffset(16)]
+ public sbyte __dummy___data__15;
+
+ [FieldOffset(17)]
+ public sbyte __dummy___data__16;
+
+ [FieldOffset(18)]
+ public sbyte __dummy___data__17;
+
+ [FieldOffset(19)]
+ public sbyte __dummy___data__18;
+
+ [FieldOffset(20)]
+ public sbyte __dummy___data__19;
+
+ [FieldOffset(21)]
+ public sbyte __dummy___data__20;
+
+ [FieldOffset(22)]
+ public sbyte __dummy___data__21;
+
+ [FieldOffset(23)]
+ public sbyte __dummy___data__22;
+ }
+
+ public unsafe partial struct _
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 1)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public byte __size_;
+
+ [FieldOffset(0)]
+ public sbyte __lx;
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __short __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __short(native.ToPointer(), skipVTables);
+ }
+
+ public static __short __CreateInstance(__short.Internal native, bool skipVTables = false)
+ {
+ return new __short(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__short.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(__short.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __short(__short.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __short(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __short()
+ {
+ __Instance = Marshal.AllocHGlobal(24);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__short __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class __raw : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public fixed ulong __words[3];
+
+ [FieldOffset(8)]
+ public ulong __dummy___words_1;
+
+ [FieldOffset(16)]
+ public ulong __dummy___words_2;
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static __raw __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __raw(native.ToPointer(), skipVTables);
+ }
+
+ public static __raw __CreateInstance(__raw.Internal native, bool skipVTables = false)
+ {
+ return new __raw(native, skipVTables);
+ }
+
+ private static void* __CopyValue(__raw.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(__raw.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private __raw(__raw.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected __raw(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public __raw()
+ {
+ __Instance = Marshal.AllocHGlobal(24);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string.__raw __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial struct __ulx
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ }
+
+ private __ulx.Internal __instance;
+ public __ulx.Internal __Instance { get { return __instance; } }
+
+ public static __ulx __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new __ulx(native.ToPointer(), skipVTables);
+ }
+
+ public static __ulx __CreateInstance(__ulx.Internal native, bool skipVTables = false)
+ {
+ return new __ulx(native, skipVTables);
+ }
+
+ private __ulx(__ulx.Internal native, bool skipVTables = false)
+ : this()
+ {
+ __instance = native;
+ }
+
+ private __ulx(void* native, bool skipVTables = false) : this()
+ {
+ __instance = *(Internal*) native;
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static basic_string __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new basic_string(native.ToPointer(), skipVTables);
+ }
+
+ public static basic_string __CreateInstance(basic_string.Internal native, bool skipVTables = false)
+ {
+ return new basic_string(native, skipVTables);
+ }
+
+ private static void* __CopyValue(basic_string.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(basic_string.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private basic_string(basic_string.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected basic_string(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__1.basic_string __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public string c_str()
+ {
+ var __ret = Internal.c_str_0((__Instance + __PointerAdjustment));
+ return Marshal.PtrToStringAnsi(__ret);
+ }
+
+ public static ulong npos
+ {
+ get
+ {
+ var __ptr = (ulong*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE");
+ return *__ptr;
+ }
+ }
+ }
+ }
+}
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs
index e2ae2e78..b1edc979 100644
--- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs
@@ -62,7 +62,10 @@ namespace CppSharp
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
- NonTypeTemplateParm = 26
+ NonTypeTemplateParm = 26,
+ VarTemplate = 27,
+ VarTemplateSpecialization = 28,
+ VarTemplatePartialSpecialization = 29
}
public enum AccessSpecifier
@@ -10840,6 +10843,565 @@ namespace CppSharp
}
}
+ public unsafe partial class VarTemplate : global::CppSharp.Parser.AST.Template, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 248)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.__cxx11.basic_string.Internal Name;
+
+ [FieldOffset(64)]
+ public global::std.__cxx11.basic_string.Internal USR;
+
+ [FieldOffset(96)]
+ public global::std.__cxx11.basic_string.Internal DebugText;
+
+ [FieldOffset(128)]
+ public byte IsIncomplete;
+
+ [FieldOffset(129)]
+ public byte IsDependent;
+
+ [FieldOffset(130)]
+ public byte IsImplicit;
+
+ [FieldOffset(136)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(144)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(176)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(184)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(192)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18getSpecializationsEj")]
+ internal static extern global::System.IntPtr getSpecializations_0(global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18addSpecializationsERPNS1_25VarTemplateSpecializationE")]
+ internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate20clearSpecializationsEv")]
+ internal static extern void clearSpecializations_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate23getSpecializationsCountEv")]
+ internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplate(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplate __CreateInstance(VarTemplate.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplate(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplate.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(248);
+ global::CppSharp.Parser.AST.VarTemplate.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplate(VarTemplate.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplate(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplate()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplateSpecialization getSpecializations(uint i)
+ {
+ var __ret = Internal.getSpecializations_0((__Instance + __PointerAdjustment), i);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
+ if (__ret == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
+ return __result0;
+ }
+
+ public void addSpecializations(global::CppSharp.Parser.AST.VarTemplateSpecialization s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addSpecializations_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearSpecializations()
+ {
+ Internal.clearSpecializations_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint SpecializationsCount
+ {
+ get
+ {
+ var __ret = Internal.getSpecializationsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplateSpecialization : global::CppSharp.Parser.AST.Variable, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 280)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.__cxx11.basic_string.Internal Name;
+
+ [FieldOffset(64)]
+ public global::std.__cxx11.basic_string.Internal USR;
+
+ [FieldOffset(96)]
+ public global::std.__cxx11.basic_string.Internal DebugText;
+
+ [FieldOffset(128)]
+ public byte IsIncomplete;
+
+ [FieldOffset(129)]
+ public byte IsDependent;
+
+ [FieldOffset(130)]
+ public byte IsImplicit;
+
+ [FieldOffset(136)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(144)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(176)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(184)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(192)]
+ public global::std.__cxx11.basic_string.Internal Mangled;
+
+ [FieldOffset(224)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(240)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(272)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12getArgumentsEj")]
+ internal static extern void getArguments_0(global::System.IntPtr @return, global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12addArgumentsERNS1_16TemplateArgumentE")]
+ internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization14clearArgumentsEv")]
+ internal static extern void clearArguments_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization17getArgumentsCountEv")]
+ internal static extern uint getArgumentsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplateSpecialization __CreateInstance(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplateSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(280);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplateSpecialization(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplateSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplateSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.TemplateArgument getArguments(uint i)
+ {
+ var __ret = new global::CppSharp.Parser.AST.TemplateArgument.Internal();
+ Internal.getArguments_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), i);
+ return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
+ }
+
+ public void addArguments(global::CppSharp.Parser.AST.TemplateArgument s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addArguments_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearArguments()
+ {
+ Internal.clearArguments_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint ArgumentsCount
+ {
+ get
+ {
+ var __ret = Internal.getArgumentsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplate TemplatedDecl
+ {
+ get
+ {
+ global::CppSharp.Parser.AST.VarTemplate __result0;
+ if (((Internal*) __Instance)->TemplatedDecl == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TemplatedDecl))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplate) global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap[((Internal*) __Instance)->TemplatedDecl];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplate.__CreateInstance(((Internal*) __Instance)->TemplatedDecl);
+ return __result0;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->TemplatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
+ {
+ get
+ {
+ return ((Internal*) __Instance)->SpecializationKind;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->SpecializationKind = value;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplatePartialSpecialization : global::CppSharp.Parser.AST.VarTemplateSpecialization, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 280)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.__cxx11.basic_string.Internal Name;
+
+ [FieldOffset(64)]
+ public global::std.__cxx11.basic_string.Internal USR;
+
+ [FieldOffset(96)]
+ public global::std.__cxx11.basic_string.Internal DebugText;
+
+ [FieldOffset(128)]
+ public byte IsIncomplete;
+
+ [FieldOffset(129)]
+ public byte IsDependent;
+
+ [FieldOffset(130)]
+ public byte IsImplicit;
+
+ [FieldOffset(136)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(144)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(176)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(184)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(192)]
+ public global::std.__cxx11.basic_string.Internal Mangled;
+
+ [FieldOffset(224)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(240)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(272)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplatePartialSpecialization __CreateInstance(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplatePartialSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(280);
+ global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplatePartialSpecialization(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplatePartialSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplatePartialSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
public unsafe partial class Namespace : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 464)]
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-templates.cpp b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-templates.cpp
new file mode 100644
index 00000000..a36cddfd
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-templates.cpp
@@ -0,0 +1,4 @@
+#include
+
+template class __declspec(dllexport) std::basic_string, std::allocator>;
+template class __declspec(dllexport) std::allocator;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs
new file mode 100644
index 00000000..f1c98fc1
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs
@@ -0,0 +1,358 @@
+//----------------------------------------------------------------------------
+//
+// This is autogenerated code by CppSharp.
+// Do not edit this file or all your changes will be lost after re-generation.
+//
+//----------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace std
+{
+ public unsafe partial class allocator : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public unsafe partial struct Internal
+ {
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSaIcEC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSaIcED2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new allocator(native.ToPointer(), skipVTables);
+ }
+
+ public static allocator __CreateInstance(allocator.Internal native, bool skipVTables = false)
+ {
+ return new allocator(native, skipVTables);
+ }
+
+ private static void* __CopyValue(allocator.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(0);
+ *(allocator.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private allocator(allocator.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected allocator(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public allocator()
+ {
+ __Instance = Marshal.AllocHGlobal(0);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+}
+
+namespace std
+{
+ namespace __cxx11
+ {
+ public unsafe partial class basic_string : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public unsafe partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr _M_p;
+
+ [FieldOffset(8)]
+ public ulong _M_string_length;
+
+ [FieldOffset(16)]
+ public fixed sbyte _M_local_buf[16];
+
+ [FieldOffset(17)]
+ public sbyte __dummy__M_local_buf_1;
+
+ [FieldOffset(18)]
+ public sbyte __dummy__M_local_buf_2;
+
+ [FieldOffset(19)]
+ public sbyte __dummy__M_local_buf_3;
+
+ [FieldOffset(20)]
+ public sbyte __dummy__M_local_buf_4;
+
+ [FieldOffset(21)]
+ public sbyte __dummy__M_local_buf_5;
+
+ [FieldOffset(22)]
+ public sbyte __dummy__M_local_buf_6;
+
+ [FieldOffset(23)]
+ public sbyte __dummy__M_local_buf_7;
+
+ [FieldOffset(24)]
+ public sbyte __dummy__M_local_buf_8;
+
+ [FieldOffset(25)]
+ public sbyte __dummy__M_local_buf_9;
+
+ [FieldOffset(26)]
+ public sbyte __dummy__M_local_buf_10;
+
+ [FieldOffset(27)]
+ public sbyte __dummy__M_local_buf_11;
+
+ [FieldOffset(28)]
+ public sbyte __dummy__M_local_buf_12;
+
+ [FieldOffset(29)]
+ public sbyte __dummy__M_local_buf_13;
+
+ [FieldOffset(30)]
+ public sbyte __dummy__M_local_buf_14;
+
+ [FieldOffset(31)]
+ public sbyte __dummy__M_local_buf_15;
+
+ [FieldOffset(16)]
+ public ulong _M_allocated_capacity;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv")]
+ internal static extern global::System.IntPtr c_str_0(global::System.IntPtr instance);
+ }
+
+ internal enum S_local_capacity : uint
+ {
+ _S_local_capacity = 15
+ }
+
+ public unsafe partial class _Alloc_hider : global::std.allocator, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr _M_p;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public static new _Alloc_hider __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new _Alloc_hider(native.ToPointer(), skipVTables);
+ }
+
+ public static _Alloc_hider __CreateInstance(_Alloc_hider.Internal native, bool skipVTables = false)
+ {
+ return new _Alloc_hider(native, skipVTables);
+ }
+
+ private static void* __CopyValue(_Alloc_hider.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(8);
+ *(_Alloc_hider.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private _Alloc_hider(_Alloc_hider.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected _Alloc_hider(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::std.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial struct _
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public fixed sbyte _M_local_buf[16];
+
+ [FieldOffset(1)]
+ public sbyte __dummy__M_local_buf_1;
+
+ [FieldOffset(2)]
+ public sbyte __dummy__M_local_buf_2;
+
+ [FieldOffset(3)]
+ public sbyte __dummy__M_local_buf_3;
+
+ [FieldOffset(4)]
+ public sbyte __dummy__M_local_buf_4;
+
+ [FieldOffset(5)]
+ public sbyte __dummy__M_local_buf_5;
+
+ [FieldOffset(6)]
+ public sbyte __dummy__M_local_buf_6;
+
+ [FieldOffset(7)]
+ public sbyte __dummy__M_local_buf_7;
+
+ [FieldOffset(8)]
+ public sbyte __dummy__M_local_buf_8;
+
+ [FieldOffset(9)]
+ public sbyte __dummy__M_local_buf_9;
+
+ [FieldOffset(10)]
+ public sbyte __dummy__M_local_buf_10;
+
+ [FieldOffset(11)]
+ public sbyte __dummy__M_local_buf_11;
+
+ [FieldOffset(12)]
+ public sbyte __dummy__M_local_buf_12;
+
+ [FieldOffset(13)]
+ public sbyte __dummy__M_local_buf_13;
+
+ [FieldOffset(14)]
+ public sbyte __dummy__M_local_buf_14;
+
+ [FieldOffset(15)]
+ public sbyte __dummy__M_local_buf_15;
+
+ [FieldOffset(0)]
+ public ulong _M_allocated_capacity;
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static basic_string __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new basic_string(native.ToPointer(), skipVTables);
+ }
+
+ public static basic_string __CreateInstance(basic_string.Internal native, bool skipVTables = false)
+ {
+ return new basic_string(native, skipVTables);
+ }
+
+ private static void* __CopyValue(basic_string.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(32);
+ *(basic_string.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private basic_string(basic_string.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected basic_string(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.__cxx11.basic_string __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public string c_str()
+ {
+ var __ret = Internal.c_str_0((__Instance + __PointerAdjustment));
+ return Marshal.PtrToStringAnsi(__ret);
+ }
+
+ public static ulong npos
+ {
+ get
+ {
+ var __ptr = (ulong*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4nposE");
+ return *__ptr;
+ }
+ }
+ }
+ }
+}
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs
index 0b43b4b9..37cd58e7 100644
--- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs
@@ -62,7 +62,10 @@ namespace CppSharp
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
- NonTypeTemplateParm = 26
+ NonTypeTemplateParm = 26,
+ VarTemplate = 27,
+ VarTemplateSpecialization = 28,
+ VarTemplatePartialSpecialization = 29
}
public enum AccessSpecifier
@@ -10840,6 +10843,565 @@ namespace CppSharp
}
}
+ public unsafe partial class VarTemplate : global::CppSharp.Parser.AST.Template, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 176)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(40)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(48)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(56)]
+ public byte IsIncomplete;
+
+ [FieldOffset(57)]
+ public byte IsDependent;
+
+ [FieldOffset(58)]
+ public byte IsImplicit;
+
+ [FieldOffset(64)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(72)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(104)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(120)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplateD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18getSpecializationsEj")]
+ internal static extern global::System.IntPtr getSpecializations_0(global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate18addSpecializationsERPNS1_25VarTemplateSpecializationE")]
+ internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate20clearSpecializationsEv")]
+ internal static extern void clearSpecializations_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST11VarTemplate23getSpecializationsCountEv")]
+ internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplate(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplate __CreateInstance(VarTemplate.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplate(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplate.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(176);
+ global::CppSharp.Parser.AST.VarTemplate.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplate(VarTemplate.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplate(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplate()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(176);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(176);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplateSpecialization getSpecializations(uint i)
+ {
+ var __ret = Internal.getSpecializations_0((__Instance + __PointerAdjustment), i);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
+ if (__ret == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
+ return __result0;
+ }
+
+ public void addSpecializations(global::CppSharp.Parser.AST.VarTemplateSpecialization s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addSpecializations_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearSpecializations()
+ {
+ Internal.clearSpecializations_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint SpecializationsCount
+ {
+ get
+ {
+ var __ret = Internal.getSpecializationsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplateSpecialization : global::CppSharp.Parser.AST.Variable, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 184)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(40)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(48)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(56)]
+ public byte IsIncomplete;
+
+ [FieldOffset(57)]
+ public byte IsDependent;
+
+ [FieldOffset(58)]
+ public byte IsImplicit;
+
+ [FieldOffset(64)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(72)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(104)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(120)]
+ public global::std.basic_string.Internal Mangled;
+
+ [FieldOffset(128)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(144)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(176)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12getArgumentsEj")]
+ internal static extern void getArguments_0(global::System.IntPtr @return, global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization12addArgumentsERNS1_16TemplateArgumentE")]
+ internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization14clearArgumentsEv")]
+ internal static extern void clearArguments_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST25VarTemplateSpecialization17getArgumentsCountEv")]
+ internal static extern uint getArgumentsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplateSpecialization __CreateInstance(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplateSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(184);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplateSpecialization(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplateSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplateSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(184);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(184);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.TemplateArgument getArguments(uint i)
+ {
+ var __ret = new global::CppSharp.Parser.AST.TemplateArgument.Internal();
+ Internal.getArguments_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), i);
+ return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
+ }
+
+ public void addArguments(global::CppSharp.Parser.AST.TemplateArgument s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addArguments_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearArguments()
+ {
+ Internal.clearArguments_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint ArgumentsCount
+ {
+ get
+ {
+ var __ret = Internal.getArgumentsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplate TemplatedDecl
+ {
+ get
+ {
+ global::CppSharp.Parser.AST.VarTemplate __result0;
+ if (((Internal*) __Instance)->TemplatedDecl == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TemplatedDecl))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplate) global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap[((Internal*) __Instance)->TemplatedDecl];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplate.__CreateInstance(((Internal*) __Instance)->TemplatedDecl);
+ return __result0;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->TemplatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
+ {
+ get
+ {
+ return ((Internal*) __Instance)->SpecializationKind;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->SpecializationKind = value;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplatePartialSpecialization : global::CppSharp.Parser.AST.VarTemplateSpecialization, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 184)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(40)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(48)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(56)]
+ public byte IsIncomplete;
+
+ [FieldOffset(57)]
+ public byte IsDependent;
+
+ [FieldOffset(58)]
+ public byte IsImplicit;
+
+ [FieldOffset(64)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(72)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(104)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(112)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(120)]
+ public global::std.basic_string.Internal Mangled;
+
+ [FieldOffset(128)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(144)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(176)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationC2ERKS2_")]
+ internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZN8CppSharp9CppParser3AST32VarTemplatePartialSpecializationD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplatePartialSpecialization __CreateInstance(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplatePartialSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(184);
+ global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplatePartialSpecialization(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplatePartialSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplatePartialSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(184);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(184);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
public unsafe partial class Namespace : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 392)]
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.dll-templates.cpp b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.dll-templates.cpp
new file mode 100644
index 00000000..021e4448
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.dll-templates.cpp
@@ -0,0 +1,29 @@
+#include
+#include
+#include
+
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-templates.cpp b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-templates.cpp
new file mode 100644
index 00000000..a36cddfd
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-templates.cpp
@@ -0,0 +1,4 @@
+#include
+
+template class __declspec(dllexport) std::basic_string, std::allocator>;
+template class __declspec(dllexport) std::allocator;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs
new file mode 100644
index 00000000..fb9b7eda
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs
@@ -0,0 +1,505 @@
+//----------------------------------------------------------------------------
+//
+// This is autogenerated code by CppSharp.
+// Do not edit this file or all your changes will be lost after re-generation.
+//
+//----------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace std
+{
+ public unsafe partial class allocator : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public unsafe partial struct Internal
+ {
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSaIcEC2Ev")]
+ internal static extern void ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSaIcED2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new allocator(native.ToPointer(), skipVTables);
+ }
+
+ public static allocator __CreateInstance(allocator.Internal native, bool skipVTables = false)
+ {
+ return new allocator(native, skipVTables);
+ }
+
+ private static void* __CopyValue(allocator.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(0);
+ *(allocator.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private allocator(allocator.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected allocator(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public allocator()
+ {
+ __Instance = Marshal.AllocHGlobal(0);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+}
+
+namespace std
+{
+ public unsafe partial class basic_string : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public unsafe partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr _M_p;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSsD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNKSs5c_strEv")]
+ internal static extern global::System.IntPtr c_str_0(global::System.IntPtr instance);
+ }
+
+ public unsafe partial class _Alloc_hider : global::std.allocator, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::System.IntPtr _M_p;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSs12_Alloc_hiderD2Ev")]
+ internal static extern void dtor_0(global::System.IntPtr instance);
+ }
+
+ public static new _Alloc_hider __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new _Alloc_hider(native.ToPointer(), skipVTables);
+ }
+
+ public static _Alloc_hider __CreateInstance(_Alloc_hider.Internal native, bool skipVTables = false)
+ {
+ return new _Alloc_hider(native, skipVTables);
+ }
+
+ private static void* __CopyValue(_Alloc_hider.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(8);
+ *(_Alloc_hider.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private _Alloc_hider(_Alloc_hider.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected _Alloc_hider(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::std.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public sbyte* _M_p
+ {
+ get
+ {
+ return ((Internal*) __Instance)->_M_p;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->_M_p = (global::System.IntPtr) value;
+ }
+ }
+ }
+
+ public unsafe partial class _Rep_base : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Internal
+ {
+ [FieldOffset(0)]
+ public ulong _M_length;
+
+ [FieldOffset(8)]
+ public ulong _M_capacity;
+
+ [FieldOffset(16)]
+ public int _M_refcount;
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static _Rep_base __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new _Rep_base(native.ToPointer(), skipVTables);
+ }
+
+ public static _Rep_base __CreateInstance(_Rep_base.Internal native, bool skipVTables = false)
+ {
+ return new _Rep_base(native, skipVTables);
+ }
+
+ private static void* __CopyValue(_Rep_base.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(_Rep_base.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private _Rep_base(_Rep_base.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected _Rep_base(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public _Rep_base()
+ {
+ __Instance = Marshal.AllocHGlobal(24);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.basic_string._Rep_base __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public int _M_refcount
+ {
+ get
+ {
+ return ((Internal*) __Instance)->_M_refcount;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->_M_refcount = value;
+ }
+ }
+ }
+
+ public unsafe partial class _Rep : global::std.basic_string._Rep_base, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public ulong _M_length;
+
+ [FieldOffset(8)]
+ public ulong _M_capacity;
+
+ [FieldOffset(16)]
+ public int _M_refcount;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSs4_Rep12_S_empty_repEv")]
+ internal static extern global::System.IntPtr _S_empty_rep_0();
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNKSs4_Rep12_M_is_leakedEv")]
+ [return: MarshalAsAttribute(UnmanagedType.I1)]
+ internal static extern bool _M_is_leaked_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNKSs4_Rep12_M_is_sharedEv")]
+ [return: MarshalAsAttribute(UnmanagedType.I1)]
+ internal static extern bool _M_is_shared_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSs4_Rep13_M_set_leakedEv")]
+ internal static extern void _M_set_leaked_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSs4_Rep15_M_set_sharableEv")]
+ internal static extern void _M_set_sharable_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSs4_Rep10_M_refdataEv")]
+ internal static extern sbyte* _M_refdata_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_ZNSs4_Rep10_M_refcopyEv")]
+ internal static extern sbyte* _M_refcopy_0(global::System.IntPtr instance);
+ }
+
+ public static new _Rep __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new _Rep(native.ToPointer(), skipVTables);
+ }
+
+ public static _Rep __CreateInstance(_Rep.Internal native, bool skipVTables = false)
+ {
+ return new _Rep(native, skipVTables);
+ }
+
+ private static void* __CopyValue(_Rep.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(24);
+ *(_Rep.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private _Rep(_Rep.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected _Rep(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public _Rep()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(24);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ public bool _M_is_leaked()
+ {
+ var __ret = Internal._M_is_leaked_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+
+ public bool _M_is_shared()
+ {
+ var __ret = Internal._M_is_shared_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+
+ public void _M_set_leaked()
+ {
+ Internal._M_set_leaked_0((__Instance + __PointerAdjustment));
+ }
+
+ public void _M_set_sharable()
+ {
+ Internal._M_set_sharable_0((__Instance + __PointerAdjustment));
+ }
+
+ public sbyte* _M_refdata()
+ {
+ var __ret = Internal._M_refdata_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+
+ public sbyte* _M_refcopy()
+ {
+ var __ret = Internal._M_refcopy_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+
+ public static global::std.basic_string._Rep _S_empty_rep()
+ {
+ var __ret = Internal._S_empty_rep_0();
+ global::std.basic_string._Rep __result0;
+ if (__ret == IntPtr.Zero) __result0 = null;
+ else if (global::std.basic_string._Rep.NativeToManagedMap.ContainsKey(__ret))
+ __result0 = (global::std.basic_string._Rep) global::std.basic_string._Rep.NativeToManagedMap[__ret];
+ else __result0 = global::std.basic_string._Rep.__CreateInstance(__ret);
+ return __result0;
+ }
+
+ public static ulong _S_max_size
+ {
+ get
+ {
+ var __ptr = (ulong*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "_ZNSs4_Rep11_S_max_sizeE");
+ return *__ptr;
+ }
+ }
+
+ public static sbyte _S_terminal
+ {
+ get
+ {
+ var __ptr = (sbyte*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "_ZNSs4_Rep11_S_terminalE");
+ return *__ptr;
+ }
+ }
+
+ public static ulong[] _S_empty_rep_storage
+ {
+ get
+ {
+ var __ptr = (byte*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "_ZNSs4_Rep20_S_empty_rep_storageE");
+ return null;
+ }
+ }
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static basic_string __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new basic_string(native.ToPointer(), skipVTables);
+ }
+
+ public static basic_string __CreateInstance(basic_string.Internal native, bool skipVTables = false)
+ {
+ return new basic_string(native, skipVTables);
+ }
+
+ private static void* __CopyValue(basic_string.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(8);
+ *(basic_string.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private basic_string(basic_string.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected basic_string(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.basic_string __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment));
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public string c_str()
+ {
+ var __ret = Internal.c_str_0((__Instance + __PointerAdjustment));
+ return Marshal.PtrToStringAnsi(__ret);
+ }
+
+ public static ulong npos
+ {
+ get
+ {
+ var __ptr = (ulong*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "_ZNSs4nposE");
+ return *__ptr;
+ }
+ }
+ }
+}
diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs
index 940892d2..08284259 100644
--- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs
+++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs
@@ -62,7 +62,10 @@ namespace CppSharp
Friend = 23,
TemplateTemplateParm = 24,
TemplateTypeParm = 25,
- NonTypeTemplateParm = 26
+ NonTypeTemplateParm = 26,
+ VarTemplate = 27,
+ VarTemplateSpecialization = 28,
+ VarTemplatePartialSpecialization = 29
}
public enum AccessSpecifier
@@ -10841,6 +10844,565 @@ namespace CppSharp
}
}
+ public unsafe partial class VarTemplate : global::CppSharp.Parser.AST.Template, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 248)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(64)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(96)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(128)]
+ public byte IsIncomplete;
+
+ [FieldOffset(129)]
+ public byte IsDependent;
+
+ [FieldOffset(130)]
+ public byte IsImplicit;
+
+ [FieldOffset(136)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(144)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(176)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(184)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(192)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??0VarTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??0VarTemplate@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
+ internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??1VarTemplate@AST@CppParser@CppSharp@@QEAA@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?getSpecializations@VarTemplate@AST@CppParser@CppSharp@@QEAAPEAVVarTemplateSpecialization@234@I@Z")]
+ internal static extern global::System.IntPtr getSpecializations_0(global::System.IntPtr instance, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?addSpecializations@VarTemplate@AST@CppParser@CppSharp@@QEAAXAEAPEAVVarTemplateSpecialization@234@@Z")]
+ internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?clearSpecializations@VarTemplate@AST@CppParser@CppSharp@@QEAAXXZ")]
+ internal static extern void clearSpecializations_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?getSpecializationsCount@VarTemplate@AST@CppParser@CppSharp@@QEAAIXZ")]
+ internal static extern uint getSpecializationsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplate __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplate(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplate __CreateInstance(VarTemplate.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplate(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplate.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(248);
+ global::CppSharp.Parser.AST.VarTemplate.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplate(VarTemplate.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplate(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplate()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(248);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplateSpecialization getSpecializations(uint i)
+ {
+ var __ret = Internal.getSpecializations_0((__Instance + __PointerAdjustment), i);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization __result0;
+ if (__ret == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap.ContainsKey(__ret))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplateSpecialization) global::CppSharp.Parser.AST.VarTemplateSpecialization.NativeToManagedMap[__ret];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplateSpecialization.__CreateInstance(__ret);
+ return __result0;
+ }
+
+ public void addSpecializations(global::CppSharp.Parser.AST.VarTemplateSpecialization s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addSpecializations_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearSpecializations()
+ {
+ Internal.clearSpecializations_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint SpecializationsCount
+ {
+ get
+ {
+ var __ret = Internal.getSpecializationsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplateSpecialization : global::CppSharp.Parser.AST.Variable, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 280)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(64)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(96)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(128)]
+ public byte IsIncomplete;
+
+ [FieldOffset(129)]
+ public byte IsDependent;
+
+ [FieldOffset(130)]
+ public byte IsImplicit;
+
+ [FieldOffset(136)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(144)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(176)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(184)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(192)]
+ public global::std.basic_string.Internal Mangled;
+
+ [FieldOffset(224)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(240)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(272)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??0VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??0VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
+ internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??1VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?getArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAA?AUTemplateArgument@234@I@Z")]
+ internal static extern void getArguments_0(global::System.IntPtr instance, global::System.IntPtr @return, uint i);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?addArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXAEAUTemplateArgument@234@@Z")]
+ internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?clearArguments@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAAXXZ")]
+ internal static extern void clearArguments_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?getArgumentsCount@VarTemplateSpecialization@AST@CppParser@CppSharp@@QEAAIXZ")]
+ internal static extern uint getArgumentsCount_0(global::System.IntPtr instance);
+ }
+
+ public static new VarTemplateSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplateSpecialization __CreateInstance(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplateSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplateSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(280);
+ global::CppSharp.Parser.AST.VarTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplateSpecialization(VarTemplateSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplateSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplateSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public global::CppSharp.Parser.AST.TemplateArgument getArguments(uint i)
+ {
+ var __ret = new global::CppSharp.Parser.AST.TemplateArgument.Internal();
+ Internal.getArguments_0((__Instance + __PointerAdjustment), new IntPtr(&__ret), i);
+ return global::CppSharp.Parser.AST.TemplateArgument.__CreateInstance(__ret);
+ }
+
+ public void addArguments(global::CppSharp.Parser.AST.TemplateArgument s)
+ {
+ if (ReferenceEquals(s, null))
+ throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = s.__Instance;
+ Internal.addArguments_0((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ public void clearArguments()
+ {
+ Internal.clearArguments_0((__Instance + __PointerAdjustment));
+ }
+
+ public uint ArgumentsCount
+ {
+ get
+ {
+ var __ret = Internal.getArgumentsCount_0((__Instance + __PointerAdjustment));
+ return __ret;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.VarTemplate TemplatedDecl
+ {
+ get
+ {
+ global::CppSharp.Parser.AST.VarTemplate __result0;
+ if (((Internal*) __Instance)->TemplatedDecl == IntPtr.Zero) __result0 = null;
+ else if (global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TemplatedDecl))
+ __result0 = (global::CppSharp.Parser.AST.VarTemplate) global::CppSharp.Parser.AST.VarTemplate.NativeToManagedMap[((Internal*) __Instance)->TemplatedDecl];
+ else __result0 = global::CppSharp.Parser.AST.VarTemplate.__CreateInstance(((Internal*) __Instance)->TemplatedDecl);
+ return __result0;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->TemplatedDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
+ }
+ }
+
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind
+ {
+ get
+ {
+ return ((Internal*) __Instance)->SpecializationKind;
+ }
+
+ set
+ {
+ ((Internal*) __Instance)->SpecializationKind = value;
+ }
+ }
+ }
+
+ public unsafe partial class VarTemplatePartialSpecialization : global::CppSharp.Parser.AST.VarTemplateSpecialization, IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 280)]
+ public new partial struct Internal
+ {
+ [FieldOffset(0)]
+ public global::CppSharp.Parser.AST.DeclarationKind Kind;
+
+ [FieldOffset(4)]
+ public global::CppSharp.Parser.AST.AccessSpecifier Access;
+
+ [FieldOffset(8)]
+ public global::System.IntPtr _Namespace;
+
+ [FieldOffset(16)]
+ public global::CppSharp.Parser.SourceLocation.Internal Location;
+
+ [FieldOffset(20)]
+ public int LineNumberStart;
+
+ [FieldOffset(24)]
+ public int LineNumberEnd;
+
+ [FieldOffset(32)]
+ public global::std.basic_string.Internal Name;
+
+ [FieldOffset(64)]
+ public global::std.basic_string.Internal USR;
+
+ [FieldOffset(96)]
+ public global::std.basic_string.Internal DebugText;
+
+ [FieldOffset(128)]
+ public byte IsIncomplete;
+
+ [FieldOffset(129)]
+ public byte IsDependent;
+
+ [FieldOffset(130)]
+ public byte IsImplicit;
+
+ [FieldOffset(136)]
+ public global::System.IntPtr CompleteDeclaration;
+
+ [FieldOffset(144)]
+ public uint DefinitionOrder;
+
+ [FieldOffset(176)]
+ public global::System.IntPtr OriginalPtr;
+
+ [FieldOffset(184)]
+ public global::System.IntPtr Comment;
+
+ [FieldOffset(192)]
+ public global::std.basic_string.Internal Mangled;
+
+ [FieldOffset(224)]
+ public global::CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
+
+ [FieldOffset(240)]
+ public global::System.IntPtr TemplatedDecl;
+
+ [FieldOffset(272)]
+ public global::CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??0VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??0VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
+ internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??1VarTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+ }
+
+ public static new VarTemplatePartialSpecialization __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native.ToPointer(), skipVTables);
+ }
+
+ public static VarTemplatePartialSpecialization __CreateInstance(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ {
+ return new VarTemplatePartialSpecialization(native, skipVTables);
+ }
+
+ private static void* __CopyValue(VarTemplatePartialSpecialization.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(280);
+ global::CppSharp.Parser.AST.VarTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
+ return ret.ToPointer();
+ }
+
+ private VarTemplatePartialSpecialization(VarTemplatePartialSpecialization.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected VarTemplatePartialSpecialization(void* native, bool skipVTables = false)
+ : base((void*) null)
+ {
+ __PointerAdjustment = 0;
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public VarTemplatePartialSpecialization()
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplatePartialSpecialization _0)
+ : this((void*) null)
+ {
+ __Instance = Marshal.AllocHGlobal(280);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ if (ReferenceEquals(_0, null))
+ throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
+ var __arg0 = _0.__Instance;
+ Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ global::CppSharp.Parser.AST.Declaration __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
public unsafe partial class Namespace : global::CppSharp.Parser.AST.DeclarationContext, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 440)]
diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.dll-templates.cpp b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.dll-templates.cpp
new file mode 100644
index 00000000..021e4448
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.dll-templates.cpp
@@ -0,0 +1,29 @@
+#include
+#include
+#include
+
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
+template class vector;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std-templates.cpp b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std-templates.cpp
new file mode 100644
index 00000000..205042ac
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std-templates.cpp
@@ -0,0 +1,4 @@
+#include
+
+template class __declspec(dllexport) std::allocator;
+template class __declspec(dllexport) std::basic_string, std::allocator>;
\ No newline at end of file
diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs
new file mode 100644
index 00000000..82fe8ae2
--- /dev/null
+++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs
@@ -0,0 +1,317 @@
+//----------------------------------------------------------------------------
+//
+// This is autogenerated code by CppSharp.
+// Do not edit this file or all your changes will be lost after re-generation.
+//
+//----------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace std
+{
+ public unsafe partial class allocator : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public unsafe partial struct Internal
+ {
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??0?$allocator@D@std@@QEAA@XZ")]
+ internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new allocator(native.ToPointer(), skipVTables);
+ }
+
+ public static allocator __CreateInstance(allocator.Internal native, bool skipVTables = false)
+ {
+ return new allocator(native, skipVTables);
+ }
+
+ private static void* __CopyValue(allocator.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(0);
+ *(allocator.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private allocator(allocator.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected allocator(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public allocator()
+ {
+ __Instance = Marshal.AllocHGlobal(0);
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ Internal.ctor_0((__Instance + __PointerAdjustment));
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.allocator __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+ }
+
+ public unsafe partial class _Alloc_allocate
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_construct
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_destroy
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_max_size
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+
+ public unsafe partial class _Alloc_select
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 0)]
+ public partial struct Internal
+ {
+ }
+ }
+}
+
+namespace std
+{
+ public unsafe partial class basic_string : IDisposable
+ {
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public unsafe partial struct Internal
+ {
+ [FieldOffset(0)]
+ public fixed sbyte _Buf[16];
+
+ [FieldOffset(1)]
+ public sbyte __dummy__Buf_1;
+
+ [FieldOffset(2)]
+ public sbyte __dummy__Buf_2;
+
+ [FieldOffset(3)]
+ public sbyte __dummy__Buf_3;
+
+ [FieldOffset(4)]
+ public sbyte __dummy__Buf_4;
+
+ [FieldOffset(5)]
+ public sbyte __dummy__Buf_5;
+
+ [FieldOffset(6)]
+ public sbyte __dummy__Buf_6;
+
+ [FieldOffset(7)]
+ public sbyte __dummy__Buf_7;
+
+ [FieldOffset(8)]
+ public sbyte __dummy__Buf_8;
+
+ [FieldOffset(9)]
+ public sbyte __dummy__Buf_9;
+
+ [FieldOffset(10)]
+ public sbyte __dummy__Buf_10;
+
+ [FieldOffset(11)]
+ public sbyte __dummy__Buf_11;
+
+ [FieldOffset(12)]
+ public sbyte __dummy__Buf_12;
+
+ [FieldOffset(13)]
+ public sbyte __dummy__Buf_13;
+
+ [FieldOffset(14)]
+ public sbyte __dummy__Buf_14;
+
+ [FieldOffset(15)]
+ public sbyte __dummy__Buf_15;
+
+ [FieldOffset(0)]
+ public global::System.IntPtr _Ptr;
+
+ [FieldOffset(0)]
+ public fixed sbyte _Alias[16];
+
+ [FieldOffset(1)]
+ public sbyte __dummy__Alias_1;
+
+ [FieldOffset(2)]
+ public sbyte __dummy__Alias_2;
+
+ [FieldOffset(3)]
+ public sbyte __dummy__Alias_3;
+
+ [FieldOffset(4)]
+ public sbyte __dummy__Alias_4;
+
+ [FieldOffset(5)]
+ public sbyte __dummy__Alias_5;
+
+ [FieldOffset(6)]
+ public sbyte __dummy__Alias_6;
+
+ [FieldOffset(7)]
+ public sbyte __dummy__Alias_7;
+
+ [FieldOffset(8)]
+ public sbyte __dummy__Alias_8;
+
+ [FieldOffset(9)]
+ public sbyte __dummy__Alias_9;
+
+ [FieldOffset(10)]
+ public sbyte __dummy__Alias_10;
+
+ [FieldOffset(11)]
+ public sbyte __dummy__Alias_11;
+
+ [FieldOffset(12)]
+ public sbyte __dummy__Alias_12;
+
+ [FieldOffset(13)]
+ public sbyte __dummy__Alias_13;
+
+ [FieldOffset(14)]
+ public sbyte __dummy__Alias_14;
+
+ [FieldOffset(15)]
+ public sbyte __dummy__Alias_15;
+
+ [FieldOffset(16)]
+ public ulong _Mysize;
+
+ [FieldOffset(24)]
+ public ulong _Myres;
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ")]
+ internal static extern void dtor_0(global::System.IntPtr instance, int delete);
+
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ")]
+ internal static extern global::System.IntPtr c_str_0(global::System.IntPtr instance);
+ }
+
+ public global::System.IntPtr __Instance { get; protected set; }
+
+ protected int __PointerAdjustment;
+ public static readonly System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary();
+ protected void*[] __OriginalVTables;
+
+ protected bool __ownsNativeInstance;
+
+ public static basic_string __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
+ {
+ return new basic_string(native.ToPointer(), skipVTables);
+ }
+
+ public static basic_string __CreateInstance(basic_string.Internal native, bool skipVTables = false)
+ {
+ return new basic_string(native, skipVTables);
+ }
+
+ private static void* __CopyValue(basic_string.Internal native)
+ {
+ var ret = Marshal.AllocHGlobal(32);
+ *(basic_string.Internal*) ret = native;
+ return ret.ToPointer();
+ }
+
+ private basic_string(basic_string.Internal native, bool skipVTables = false)
+ : this(__CopyValue(native), skipVTables)
+ {
+ __ownsNativeInstance = true;
+ NativeToManagedMap[__Instance] = this;
+ }
+
+ protected basic_string(void* native, bool skipVTables = false)
+ {
+ if (native == null)
+ return;
+ __Instance = new global::System.IntPtr(native);
+ }
+
+ public void Dispose()
+ {
+ Dispose(disposing: true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ global::std.basic_string __dummy;
+ NativeToManagedMap.TryRemove(__Instance, out __dummy);
+ Internal.dtor_0((__Instance + __PointerAdjustment), 0);
+ if (__ownsNativeInstance)
+ Marshal.FreeHGlobal(__Instance);
+ }
+
+ public string c_str()
+ {
+ var __ret = Internal.c_str_0((__Instance + __PointerAdjustment));
+ return Marshal.PtrToStringAnsi(__ret);
+ }
+
+ public static ulong npos
+ {
+ get
+ {
+ var __ptr = (ulong*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB");
+ return *__ptr;
+ }
+ }
+ }
+}
diff --git a/src/CppParser/Bindings/ParserGen.cs b/src/CppParser/Bindings/ParserGen.cs
index 0789177f..fac06703 100644
--- a/src/CppParser/Bindings/ParserGen.cs
+++ b/src/CppParser/Bindings/ParserGen.cs
@@ -86,6 +86,7 @@ namespace CppSharp
options.OutputNamespace = string.Empty;
options.CheckSymbols = false;
+ options.Verbose = true;
}
private void SetupLinuxOptions(DriverOptions options)
diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp
index 62dedf8a..62ba3aa6 100644
--- a/src/CppParser/Parser.cpp
+++ b/src/CppParser/Parser.cpp
@@ -1450,6 +1450,108 @@ Parser::WalkFunctionTemplateSpec(clang::FunctionTemplateSpecializationInfo* FTSI
return FTS;
}
+
+//-----------------------------------//
+
+VarTemplate* Parser::WalkVarTemplate(const clang::VarTemplateDecl* TD)
+{
+ auto NS = GetNamespace(TD);
+ assert(NS && "Expected a valid namespace");
+
+ auto USR = GetDeclUSR(TD);
+ auto VT = NS->FindTemplate(USR);
+ if (VT != nullptr)
+ return VT;
+
+ VT = new VarTemplate();
+ HandleDeclaration(TD, VT);
+
+ VT->Name = GetDeclName(TD);
+ VT->_Namespace = NS;
+ NS->Templates.push_back(VT);
+
+ auto RC = WalkVariable(TD->getTemplatedDecl());
+ VT->TemplatedDecl = RC;
+ VT->Parameters = WalkTemplateParameterList(TD->getTemplateParameters());
+
+ return VT;
+}
+
+VarTemplateSpecialization*
+Parser::WalkVarTemplateSpecialization(const clang::VarTemplateSpecializationDecl* VTS)
+{
+ using namespace clang;
+
+ auto VT = WalkVarTemplate(VTS->getSpecializedTemplate());
+ auto USR = GetDeclUSR(VTS);
+ auto TS = VT->FindSpecialization(USR);
+ if (TS != nullptr)
+ return TS;
+
+ TS = new VarTemplateSpecialization();
+ HandleDeclaration(VTS, TS);
+
+ auto NS = GetNamespace(VTS);
+ assert(NS && "Expected a valid namespace");
+ TS->_Namespace = NS;
+ TS->Name = VTS->getName();
+ TS->TemplatedDecl = VT;
+ TS->SpecializationKind = WalkTemplateSpecializationKind(VTS->getSpecializationKind());
+ VT->Specializations.push_back(TS);
+
+ auto& TAL = VTS->getTemplateArgs();
+ auto TSI = VTS->getTypeAsWritten();
+ if (TSI)
+ {
+ auto TL = TSI->getTypeLoc();
+ auto TSL = TL.getAs();
+ TS->Arguments = WalkTemplateArgumentList(&TAL, &TSL);
+ }
+ else
+ {
+ TS->Arguments = WalkTemplateArgumentList(&TAL, (clang::TemplateSpecializationTypeLoc*) 0);
+ }
+
+ WalkVariable(VTS, TS);
+
+ return TS;
+}
+
+VarTemplatePartialSpecialization*
+Parser::WalkVarTemplatePartialSpecialization(const clang::VarTemplatePartialSpecializationDecl* VTS)
+{
+ using namespace clang;
+
+ auto VT = WalkVarTemplate(VTS->getSpecializedTemplate());
+ auto USR = GetDeclUSR(VTS);
+ auto TS = VT->FindPartialSpecialization(USR);
+ if (TS != nullptr)
+ return TS;
+
+ TS = new VarTemplatePartialSpecialization();
+ HandleDeclaration(VTS, TS);
+
+ auto NS = GetNamespace(VTS);
+ assert(NS && "Expected a valid namespace");
+ TS->_Namespace = NS;
+ TS->Name = VTS->getName();
+ TS->TemplatedDecl = VT;
+ TS->SpecializationKind = WalkTemplateSpecializationKind(VTS->getSpecializationKind());
+ VT->Specializations.push_back(TS);
+
+ auto& TAL = VTS->getTemplateArgs();
+ if (auto TSI = VTS->getTypeAsWritten())
+ {
+ auto TL = TSI->getTypeLoc();
+ auto TSL = TL.getAs();
+ TS->Arguments = WalkTemplateArgumentList(&TAL, &TSL);
+ }
+
+ WalkVariable(VTS, TS);
+
+ return TS;
+}
+
//-----------------------------------//
static CXXMethodKind GetMethodKindFromDecl(clang::DeclarationName Name)
@@ -2828,6 +2930,20 @@ void Parser::WalkAST()
//-----------------------------------//
+void Parser::WalkVariable(const clang::VarDecl* VD, Variable* Var)
+{
+ HandleDeclaration(VD, Var);
+
+ Var->Name = VD->getName();
+ Var->Access = ConvertToAccess(VD->getAccess());
+
+ auto TL = VD->getTypeSourceInfo()->getTypeLoc();
+ Var->QualifiedType = GetQualifiedType(VD->getType(), &TL);
+
+ auto Mangled = GetDeclMangledName(VD);
+ Var->Mangled = Mangled;
+}
+
Variable* Parser::WalkVariable(const clang::VarDecl *VD)
{
using namespace clang;
@@ -2837,20 +2953,12 @@ Variable* Parser::WalkVariable(const clang::VarDecl *VD)
auto USR = GetDeclUSR(VD);
if (auto Var = NS->FindVariable(USR))
- return Var;
+ return Var;
auto Var = new Variable();
- HandleDeclaration(VD, Var);
-
- Var->Name = VD->getName();
Var->_Namespace = NS;
- Var->Access = ConvertToAccess(VD->getAccess());
-
- auto TL = VD->getTypeSourceInfo()->getTypeLoc();
- Var->QualifiedType = GetQualifiedType(VD->getType(), &TL);
- auto Mangled = GetDeclMangledName(VD);
- Var->Mangled = Mangled;
+ WalkVariable(VD, Var);
NS->Variables.push_back(Var);
@@ -3309,6 +3417,30 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
Decl = FT;
break;
}
+ case Decl::VarTemplate:
+ {
+ auto TD = cast(D);
+ auto Template = WalkVarTemplate(TD);
+
+ Decl = Template;
+ break;
+ }
+ case Decl::VarTemplateSpecialization:
+ {
+ auto TS = cast(D);
+ auto CT = WalkVarTemplateSpecialization(TS);
+
+ Decl = CT;
+ break;
+ }
+ case Decl::VarTemplatePartialSpecialization:
+ {
+ auto TS = cast(D);
+ auto CT = WalkVarTemplatePartialSpecialization(TS);
+
+ Decl = CT;
+ break;
+ }
case Decl::TypeAliasTemplate:
{
auto TD = cast(D);
@@ -3464,11 +3596,14 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
case Decl::CXXDestructor:
case Decl::CXXConversion:
break;
+ case Decl::PragmaComment:
+ case Decl::PragmaDetectMismatch:
case Decl::Empty:
case Decl::AccessSpec:
case Decl::Using:
case Decl::UsingDirective:
case Decl::UsingShadow:
+ case Decl::ConstructorUsingShadow:
case Decl::UnresolvedUsingTypename:
case Decl::UnresolvedUsingValue:
case Decl::IndirectField:
diff --git a/src/CppParser/Parser.h b/src/CppParser/Parser.h
index 08e58aec..d5e69948 100644
--- a/src/CppParser/Parser.h
+++ b/src/CppParser/Parser.h
@@ -82,6 +82,7 @@ private:
Field* WalkFieldCXX(const clang::FieldDecl* FD, Class* Class);
FunctionTemplateSpecialization* WalkFunctionTemplateSpec(clang::FunctionTemplateSpecializationInfo* FTS, Function* Function);
Variable* WalkVariable(const clang::VarDecl* VD);
+ void WalkVariable(const clang::VarDecl* VD, Variable* Var);
Friend* WalkFriend(const clang::FriendDecl* FD);
RawComment* WalkRawComment(const clang::RawComment* RC);
bool ShouldCompleteType(const clang::QualType& QualType, bool LocValid);
@@ -95,6 +96,11 @@ private:
TypeAliasTemplate* WalkTypeAliasTemplate(const clang::TypeAliasTemplateDecl* TD);
ClassTemplate* WalkClassTemplate(const clang::ClassTemplateDecl* TD);
FunctionTemplate* WalkFunctionTemplate(const clang::FunctionTemplateDecl* TD);
+ VarTemplate* WalkVarTemplate(const clang::VarTemplateDecl* VT);
+ VarTemplateSpecialization*
+ WalkVarTemplateSpecialization(const clang::VarTemplateSpecializationDecl* VTS);
+ VarTemplatePartialSpecialization*
+ WalkVarTemplatePartialSpecialization(const clang::VarTemplatePartialSpecializationDecl* VTS);
std::vector WalkTemplateArgumentList(const clang::TemplateArgumentList* TAL, clang::TemplateSpecializationTypeLoc* TSTL);
std::vector WalkTemplateArgumentList(const clang::TemplateArgumentList* TAL, const clang::ASTTemplateArgumentListInfo* TSTL);
void WalkVTable(const clang::CXXRecordDecl* RD, Class* C);
diff --git a/src/Generator.Tests/AST/TestAST.cs b/src/Generator.Tests/AST/TestAST.cs
index 9184be8e..0a2e4018 100644
--- a/src/Generator.Tests/AST/TestAST.cs
+++ b/src/Generator.Tests/AST/TestAST.cs
@@ -195,6 +195,16 @@ namespace CppSharp.Generator.Tests.AST
{
throw new NotImplementedException();
}
+
+ public bool VisitVarTemplateDecl(VarTemplate template)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool VisitVarTemplateSpecializationDecl(VarTemplateSpecialization template)
+ {
+ throw new NotImplementedException();
+ }
}
#endregion
diff --git a/src/Generator/Generators/CLI/CLITypePrinter.cs b/src/Generator/Generators/CLI/CLITypePrinter.cs
index 2e34b291..0ce27759 100644
--- a/src/Generator/Generators/CLI/CLITypePrinter.cs
+++ b/src/Generator/Generators/CLI/CLITypePrinter.cs
@@ -479,5 +479,15 @@ namespace CppSharp.Generators.CLI
{
throw new NotImplementedException();
}
+
+ public string VisitVarTemplateDecl(VarTemplate template)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string VisitVarTemplateSpecializationDecl(VarTemplateSpecialization template)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs
index e9c5c289..03298368 100644
--- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs
+++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs
@@ -795,6 +795,16 @@ namespace CppSharp.Generators.CSharp
{
throw new NotImplementedException();
}
+
+ public CSharpTypePrinterResult VisitVarTemplateDecl(VarTemplate template)
+ {
+ throw new NotImplementedException();
+ }
+
+ public CSharpTypePrinterResult VisitVarTemplateSpecializationDecl(VarTemplateSpecialization template)
+ {
+ throw new NotImplementedException();
+ }
}
public static class CSharpTypePrinterExtensions
diff --git a/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs b/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs
index 0b9a18ce..fbf3cd7c 100644
--- a/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs
+++ b/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs
@@ -288,6 +288,16 @@ namespace CppSharp.Passes
throw new NotImplementedException();
}
+ public bool VisitVarTemplateDecl(VarTemplate template)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool VisitVarTemplateSpecializationDecl(VarTemplateSpecialization template)
+ {
+ throw new NotImplementedException();
+ }
+
#endregion
}
diff --git a/src/Generator/Types/CppTypePrinter.cs b/src/Generator/Types/CppTypePrinter.cs
index a3e46b15..c5b4f423 100644
--- a/src/Generator/Types/CppTypePrinter.cs
+++ b/src/Generator/Types/CppTypePrinter.cs
@@ -403,5 +403,15 @@ namespace CppSharp.Types
{
throw new NotImplementedException();
}
+
+ public string VisitVarTemplateDecl(VarTemplate template)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string VisitVarTemplateSpecializationDecl(VarTemplateSpecialization template)
+ {
+ throw new NotImplementedException();
+ }
}
}