Browse Source

Fixed the generation of internals for nested template specialisations with pointers as T.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/685/head
Dimitar Dobrev 9 years ago
parent
commit
1771f7462b
  1. 3
      src/Generator/Generators/CSharp/CSharpSources.cs
  2. 2
      tests/CSharp/CSharpTemplates.h

3
src/Generator/Generators/CSharp/CSharpSources.cs

@ -80,7 +80,8 @@ namespace CppSharp.Generators.CSharp
f => !(f.Type.Desugar() is TemplateParameterType))) f => !(f.Type.Desugar() is TemplateParameterType)))
return string.Empty; return string.Empty;
if (specialization.Arguments.All( if (!nested &&
specialization.Arguments.All(
a => a.Type.Type != null && a.Type.Type.IsAddress())) a => a.Type.Type != null && a.Type.Type.IsAddress()))
return "_Ptr"; return "_Ptr";

2
tests/CSharp/CSharpTemplates.h

@ -69,6 +69,8 @@ private:
DependentValueFields<IndependentFields<int>> specializeWithSpecialization; DependentValueFields<IndependentFields<int>> specializeWithSpecialization;
DependentValueFields<IndependentFields<bool>> specializeWithSameSpecialization; DependentValueFields<IndependentFields<bool>> specializeWithSameSpecialization;
NestedTemplate<int> nestedTemplate; NestedTemplate<int> nestedTemplate;
DependentValueFields<DependentValueFields<int*>> nestedDependentPointer1;
DependentValueFields<DependentValueFields<char*>> nestedDependentPointer2;
void completeSpecializationInParameter(DependentValueFields<float> p1, void completeSpecializationInParameter(DependentValueFields<float> p1,
DependentValueFields<int*> p2, DependentValueFields<int*> p2,
DependentValueFields<float*> p3); DependentValueFields<float*> p3);

Loading…
Cancel
Save