Explorar o código

libdpkg: Add DPKG_ATTR_THROW and DPKG_ATTR_NOEXCEPT macros

Guillem Jover %!s(int64=12) %!d(string=hai) anos
pai
achega
633159444e
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      lib/dpkg/macros.h

+ 8 - 0
lib/dpkg/macros.h

@@ -71,6 +71,14 @@
 #define DPKG_ATTR_SENTINEL
 #endif
 
+#if defined(__cplusplus) && __cplusplus >= 201103L
+#define DPKG_ATTR_THROW(exception)
+#define DPKG_ATTR_NOEXCEPT		noexcept
+#elif defined(__cplusplus)
+#define DPKG_ATTR_THROW(exception)	throw(exception)
+#define DPKG_ATTR_NOEXCEPT		throw()
+#endif
+
 #ifdef __cplusplus
 #define DPKG_BEGIN_DECLS	extern "C" {
 #define DPKG_END_DECLS		}