Q:

How to interpret a "const unique_ptr"

const unique_ptr<int> upi{new int{4}};
cout << ++*upi << '\n';

Seems upi is a const smart pointer. The int it points to can still be modified. What if I want to declare the int as const?
const unqiue_ptr<int> const upi{new int{4}};    //Error: duplicate const

A:

As far as I understand, you want to make the integer const and not the pointer itself, right? Then you would have to write:
unqiue_ptr<const int> upi{new int{4}}; 

