This is not a duplicate of questions on template constructors or even on calling inherited template constructors.
It is specifically about calling the inherited construc
std::unique<int>
is meant to be smart pointer for int
s, i.e. a replacement for int*
.
When you use std::unique<int*>
, the pointer needs to be int**
.
Instead of
using B = std::unique_ptr<int *, decltype(&::free)>;
use
using B = std::unique_ptr<int, decltype(&::free)>;
Working code (Thanks, @CompuChip): http://ideone.com/ul29vr.