event-main.cpp 197 B

12345678910111213141516
  1. // { dg-do run }
  2. #include "event-private.h"
  3. template<typename T> void derefIfNotNull(T* ptr)
  4. {
  5. if (ptr != 0)
  6. ptr->deref();
  7. }
  8. int main()
  9. {
  10. Event * ev = new Event;
  11. derefIfNotNull(ev);
  12. }