SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct withProtectedClose {
  2.  
  3.   ~withProtectedClose() {
  4.     // Do some cleanup here...
  5.   }
  6. };
  7.  
  8. void test() {
  9.   withProtectedClose close;
  10.  
  11.   // Do some work before closing
  12. }
  13.    
  14. test.cpp: In function `void test()':
  15. test.cpp:28: warning: unused variable 'close'
  16.    
  17. struct __attribute__ ((__unused__)) withProtectedClose
  18.    
  19. withProtectedClose close;
  20. (close);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top