Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement