<div>I'm pleased to announce nifpp, C++11 wrappers for the Erlang NIF API. nifpp provides...</div><div><br></div><div><div>- Conversions to/from C++ container types, namely tuple, vector, list, deque, set, and multiset.</div>
<div>- A safe resource wrapper so that any type can be created as a resource.</div></div><div><br></div><div>Source and documentation here:</div><a href="https://github.com/goertzenator/nifpp" target="_blank">https://github.com/goertzenator/nifpp</a><div>
<br></div><div>I need to polish, test and document binary support, but the rest of it is in good shape so I'm sharing it now.</div><div><br></div><div>Below are links to C and C++ versions of an identical tuple manipulation operation. The C++ version is [imho] easier to understand, and it actually benchmarks slightly faster than the C version on most of my runs.</div>
<div><br></div><div><a href="https://github.com/goertzenator/nifpp/blob/master/examples/tuple_twiddle_c.c" target="_blank">https://github.com/goertzenator/nifpp/blob/master/examples/tuple_twiddle_c.c</a></div><div><a href="https://github.com/goertzenator/nifpp/blob/master/examples/tuple_twiddle_cpp.cpp" target="_blank">https://github.com/goertzenator/nifpp/blob/master/examples/tuple_twiddle_cpp.cpp</a></div>
<div><br></div><div><br></div><div><br></div><div>And here is an example of resource wrapping. The Boost class "mapped_file_source" which provides portable file memory mapping is instantiated as an Erlang resource.</div>
<div><br></div><div><a href="https://github.com/goertzenator/nifpp/blob/master/examples/mmap_binary.cpp" target="_blank">https://github.com/goertzenator/nifpp/blob/master/examples/mmap_binary.cpp</a></div><div><br></div>
<div><br></div><div>
<br></div><div>All feedback appreciated.</div><div><br></div><div>Thanks,</div><div>Dan.</div>