fork download
  1. #include <functional>
  2. #include <new>
  3.  
  4. int main() {
  5. typedef void*(*newptr_type)(std::size_t);
  6.  
  7. auto fn = std::bind<void*>(newptr_type(::operator new), sizeof(char)*100);
  8.  
  9. auto field = (char*)fn();
  10. }
Success #stdin #stdout 0s 2980KB
stdin
Standard input is empty
stdout
Standard output is empty