зеркало из https://github.com/mono/CppSharp.git
Generate valid C# for fields with types system template specializations
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
This commit is contained in:
Родитель
ad6557792f
Коммит
0b8f252d1b
|
@ -57,6 +57,11 @@ namespace CppSharp.Passes
|
|||
|
||||
MarkUsedFieldTypes(decl, visitedDeclarationContexts);
|
||||
}
|
||||
foreach (var @base in @class.Bases.Where(
|
||||
b => b.IsClass && b.Class.Ignore && b.Class.Fields.Count > 0))
|
||||
{
|
||||
@base.Class.GenerationKind = GenerationKind.Internal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ namespace CppSharp.Passes
|
|||
|
||||
private bool TryMarkType(Type desugared)
|
||||
{
|
||||
var tagType = desugared as TagType;
|
||||
var templateType = desugared as TemplateSpecializationType;
|
||||
var tagType = desugared as TagType ?? templateType?.Desugared.Type as TagType;
|
||||
if (tagType != null)
|
||||
{
|
||||
var specialization = tagType.Declaration as ClassTemplateSpecialization;
|
||||
|
@ -56,7 +57,6 @@ namespace CppSharp.Passes
|
|||
return true;
|
||||
}
|
||||
|
||||
var templateType = desugared as TemplateSpecializationType;
|
||||
if (templateType != null)
|
||||
{
|
||||
var template = templateType.Template;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <vector>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
#include "AnotherUnit.h"
|
||||
#include "ExcludedUnit.hpp"
|
||||
#include "CSharpTemplates.h"
|
||||
|
@ -201,6 +202,7 @@ protected:
|
|||
AbstractProprietor(int i);
|
||||
int m_value;
|
||||
long m_property;
|
||||
std::mutex m_mutex;
|
||||
};
|
||||
|
||||
class DLL_API Proprietor : public AbstractProprietor
|
||||
|
|
Загрузка…
Ссылка в новой задаче