cmake-init icon indicating copy to clipboard operation
cmake-init copied to clipboard

How to deal with C4251 warning

Open friendlyanon opened this issue 4 years ago • 3 comments

https://stackoverflow.com/a/22054743 gives a good summary for possible remedies.

PIMPL seems to be the best option, but is that really a good concept to have in an init script targeting mainly beginners?
Need to think about this.

friendlyanon avatar Apr 14 '21 02:04 friendlyanon

Another option that I came across is wrapping the library exports in a C API with a header-only library component on top to provide a usable C++ API. Consequently, this is also a method to mix binaries created with different compilers, compile flags and ABI.

friendlyanon avatar May 04 '21 16:05 friendlyanon

I have pushed 7bca880a8cc3bdb0e23d74c532e805e955a860a8 disabling this warning and with an explanation in the header file template of the shared library.

friendlyanon avatar May 05 '21 00:05 friendlyanon

@satya-das has a WIP solution called cib, which generates an hourglass interface similar to what was described by @sdutoit

friendlyanon avatar May 05 '21 19:05 friendlyanon