Skip to main content
7 events
when toggle format what by license comment
Apr 28, 2016 at 15:55 history edited Superlokkus CC BY-SA 3.0
formatting
Apr 25, 2016 at 21:28 comment added Superlokkus You could write a nice container or bundle class for your type (if I understand you correctly you were about to anyway). So let's assume your container class, uses a standard container as a private(!) member to manage your wrapper_handle_types, like std::vector or std::map, it doesn't matter. From there I would implement a method that returns a const std::vector<c_handle_types>. And from this vector you can get the array by std::vector::data(). Your wrapper class also could cache such an vector for performance, but I think my solution is fast enough.
Apr 25, 2016 at 20:54 vote accept Andrew Williamson
Apr 25, 2016 at 20:54 comment added Andrew Williamson Thanks for the answer - you make a good point about the C-library. My thoughts were that it didn't matter if the C library doesn't use operator=, because it is not going to call a destructor either. How would you recommend I handle the cases where I have an array of wrappers, and have to pass in an array of handles? I'd like this to be efficient, because it happens very frequently.
Apr 25, 2016 at 16:42 history edited Superlokkus CC BY-SA 3.0
Clarification about C vs C++ compiling
Apr 25, 2016 at 15:30 review First posts
Apr 25, 2016 at 15:59
Apr 25, 2016 at 15:29 history answered Superlokkus CC BY-SA 3.0