void my_free(int* p, int x, int y){ std:: cout << x << " " << y << "\n"; } int main() { auto my_deleter = std::bind(my_free, std::placeholders::_1, 1, 2) ; auto my_lambda = [](int* t) { my_free(t, 3, 4); }; std::unique_ptrptr(new int, my_deleter); std::unique_ptr ptr2(new int, my_lambda); return 0; }