Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
|
jmq's comments
login
jmq
on May 11, 2012
|
parent
|
context
[–]
| on:
Why should I have written ZeroMQ in C, not C++
You can reduce verbosity of the code by passing destructor function directly to unique_ptr constructor:
std::unique_ptr<Image, void (*)(Image *)>(image, deallocate_image);
evincarofautumn
on May 11, 2012
|
parent
[–]
Cool, thanks for the tip. I meant to offer an example for the general case.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: