C++20 이전

C++20 이후

// 람다 표현식을 바로 사용가능하다.
unique_ptr<int, decltype([](int* p) { free(p); })> p1(static_cast<int*>(malloc(sizeof(int))));