Skip to content

Commit

Permalink
Version 0.0.21. Using generic type constraint (C#) as hint to pass th…
Browse files Browse the repository at this point in the history
…e argument by reference in C++.
  • Loading branch information
Konard committed Nov 30, 2019
1 parent 07f9100 commit 99e8230
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public class CSharpToCppTransformer : Transformer
// private const int MaxPath = 92;
// static const int MaxPath = 92;
(new Regex(@"private (const|static readonly) ([a-zA-Z0-9]+) ([_a-zA-Z0-9]+) = ([^;]+);"), "static const $2 $3 = $4;", null, 0),
// ArgumentNotNull(EnsureAlwaysExtensionRoot root, TArgument argument) where TArgument : class
// ArgumentNotNull(EnsureAlwaysExtensionRoot root, TArgument& argument)
(new Regex(@"(?<before> [a-zA-Z]+\(([a-zA-Z *,]+, |))(?<type>[a-zA-Z]+)(?<after>(| [a-zA-Z *,]+)\))[ \r\n]+where \k<type> : class"), "${before}${type}&${after}", null, 0),
// protected virtual
// virtual
(new Regex(@"protected virtual"), "virtual", null, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>LinksPlatform's Platform.RegularExpressions.Transformer.CSharpToCpp Class Library</Description>
<Copyright>Konstantin Diachenko</Copyright>
<AssemblyTitle>Platform.RegularExpressions.Transformer.CSharpToCpp</AssemblyTitle>
<VersionPrefix>0.0.20</VersionPrefix>
<VersionPrefix>0.0.21</VersionPrefix>
<Authors>Konstantin Diachenko</Authors>
<TargetFrameworks>net471;netstandard2.0;netstandard2.1</TargetFrameworks>
<AssemblyName>Platform.RegularExpressions.Transformer.CSharpToCpp</AssemblyName>
Expand All @@ -24,7 +24,7 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latest</LangVersion>
<PackageReleaseNotes>Added support for NotSupportedException, NotImplementedException, ArgumentException and ArgumentNullException exceptions.</PackageReleaseNotes>
<PackageReleaseNotes>Using generic type constraint (C#) as hint to pass the argument by reference in C++.</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net4')) AND '$(MSBuildRuntimeType)' == 'Core' AND '$(OS)' != 'Windows_NT'">
Expand Down

0 comments on commit 99e8230

Please sign in to comment.