fork download
  1. #include <iostream>
  2. #include <memory>
  3.  
  4.  
  5. int main() {
  6. std::shared_ptr<int> iptr(new int(999), [](int*p){delete(p);});
  7. auto _d = std::get_deleter<void(*)(int*)>(iptr);
  8.  
  9. if(_d)
  10. std::cout<<"1";
  11. else
  12. std::cout<<"0";
  13. return 0;
  14. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty