common: Add a default nullptr argument to make_unique_wrapper
When wrapping C libraries that return unmanaged pointers,
lttng::make_unique_wrapper makes it easier to locally "wrap" returned
pointers.
auto val = lttng::make_unique_ptr<struct foo *,
lttng::free>(some_func());
However, in its current form, a nullptr must be passed to define an
alias:
using my_type_uptr =
decltype(lttng::make_unique_wrapper<lttng_session,
lttng::free>(nullptr));
Adding a default nullptr argument cuts down a bit of boiler plate.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9d05d8162d28cc156b1e9ec6fe623f1cc02e9c8e
This page took 0.025158 seconds and 4 git commands to generate.