+#ifndef CPP_HAS_TRY_CATCH
+#define CPP_HAS_TRY_CATCH 0
+#define NCURSES_CPP_TRY /* nothing */
+#define NCURSES_CPP_CATCH(e) if (false)
+#define THROWS(s) /* nothing */
+#elif CPP_HAS_TRY_CATCH
+ throw *e;
+#define NCURSES_CPP_TRY try
+#define NCURSES_CPP_CATCH(e) catch(e)
+#define THROWS(s) throw(s)
+#endif
+}