On 12/04/2010 05:38 PM, Henrik Nordström wrote:
> fre 2010-12-03 klockan 19:11 +0200 skrev Tsantilas Christos:
>
>> The only way I found to solve the above is to define C++ wrappers
>> functions for X509_free, EVP_PKEY_free, BIG_NUM_free etc (~ 10 wrapper
>> functions)
>>
>> Any opinion?
>
> extern "C" in the DeAllocator declaration should be sufficient, maybe
> "hidden" in an typedef for clarity.
It was one of the first thinks I tried. But "extern "C"" inside template
causes compile errors.
The typedef was not easy solution because the template argument typename
T used also inside DeAllocator argument:
template <typename T, void (*DeAllocator)(T *t)> class TidyPointer{
It is tricky....
>
> Regards
> Henrik
>
>
Received on Mon Dec 06 2010 - 11:39:53 MST
This archive was generated by hypermail 2.2.0 : Mon Dec 06 2010 - 12:00:05 MST