Remove dynamic exceptions
[anna.git] / include / anna / core / define.autoenum.hpp
index 9378110..a05c120 100644 (file)
  */
 #define anna_declare_enum(name) \
    static const char* literal []; \
-   static int calculateSize () throw () { \
+   static int calculateSize () { \
       int ii = 0; \
       while (literal [ii] != NULL) ii ++; \
       return ii; \
    } \
-   static _v asEnum (const char* str) throw () { \
+   static _v asEnum (const char* str) { \
       for (int ii = 0; literal [ii] != NULL; ii ++) { \
          if (strcasecmp (str, literal [ii]) == 0) \
             return (_v) ii; \
       } \
       return None; \
    } \
-   static _v asEnumEx (const char* str) throw (anna::RuntimeException) { \
+   static _v asEnumEx (const char* str) noexcept(false) { \
       if (str == NULL) { \
          std::string msg (#name); \
          msg += "::asEnumEx | str can not be null"; \
       } \
       return result; \
    } \
-   static _v asEnum (const std::string& str) throw () { return asEnum (str.c_str ()); } \
-   static _v asEnumEx (const std::string& str) throw (anna::RuntimeException) { return asEnumEx (str.c_str ()); } \
-   static const char* asCString (const _v v) throw () { return (v != None) ? literal [v]: NULL; } \
-   static const char* asNotNullCString (const _v v) throw () { return (v != None) ? literal [v]: "<none>"; } \
-   static std::string asList () throw () {\
+   static _v asEnum (const std::string& str) { return asEnum (str.c_str ()); } \
+   static _v asEnumEx (const std::string& str) noexcept(false) { return asEnumEx (str.c_str ()); } \
+   static const char* asCString (const _v v) { return (v != None) ? literal [v]: NULL; } \
+   static const char* asNotNullCString (const _v v) { return (v != None) ? literal [v]: "<none>"; } \
+   static std::string asList () {\
       std::string result;\
       for (int ii = 0; literal [ii] != NULL; ii ++) { \
          if (ii == 0 && strcmp (literal [ii], "None") == 0) continue; \