Single C++/CLI method to wrap many type specific C functions
- by T33C
I am wrapping a C library using C++/CLI so that the C library can be used easily from C# in a C#'ish way.
Some of the functions in this library are for putting a value into a container. There are no generics in C so there exists a function per type CLIB_SetBool(BOOL value), CLIB_SetInt(int value), CLIB_SetString(char* string) and so on.
To make…