Skip to content

Generating multiple implementations of a generic interface using C++/CLI template and .NET Framework 4.7.2

License

Notifications You must be signed in to change notification settings

Konard/CppCLIGenericsExample

Repository files navigation

CppCLIGenericsExample

This example shows how to generate multiple generic interface implementations using C++/CLI template. There is the IGeneric<T> interface. C++/CLI template is used to generate specific implementations of this interface for UInt64, UInt32, UInt16 and Byte types. All implementations share single base template ClassTemplate logic.

The problem with current approach is that it works only for Windows while support for C++/CLI is not crossplatform.

It is possible to achieve the same result using C#, T4 text template and .NET Core 2.2.

Prerequisites

Run

  • Clone repository
  • Open solution (.sln file) in Visual Studio
  • Press F5 to build and start program

Development process videos

https://youtu.be/MSjBlWnINQQ

About

Generating multiple implementations of a generic interface using C++/CLI template and .NET Framework 4.7.2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published