Browse Source

Fixed generation of copy constructors for CLI value types.

pull/203/head
triton 12 years ago committed by Dimitar Dobrev
parent
commit
8e9d4f9c31
  1. 4
      src/Generator/Generators/CLI/CLIHeadersTemplate.cs
  2. 4
      src/Generator/Generators/CLI/CLISourcesTemplate.cs

4
src/Generator/Generators/CLI/CLIHeadersTemplate.cs

@ -374,6 +374,10 @@ namespace CppSharp.Generators.CLI @@ -374,6 +374,10 @@ namespace CppSharp.Generators.CLI
if (ASTUtils.CheckIgnoreMethod(ctor))
continue;
// C++/CLI does not allow special member funtions for value types.
if (@class.IsValueType && ctor.IsCopyConstructor)
continue;
GenerateMethod(ctor);
}

4
src/Generator/Generators/CLI/CLISourcesTemplate.cs

@ -142,6 +142,10 @@ namespace CppSharp.Generators.CLI @@ -142,6 +142,10 @@ namespace CppSharp.Generators.CLI
if (ASTUtils.CheckIgnoreMethod(method))
continue;
// C++/CLI does not allow special member funtions for value types.
if (@class.IsValueType && method.IsCopyConstructor)
continue;
GenerateMethod(method, @class);
}

Loading…
Cancel
Save