Browse Source

AP_Common: added CLASS_NO_COPY() macro

used to make it easy to forbid copy of classes
c415-sdk
Andrew Tridgell 4 years ago
parent
commit
6c0c6a1f48
  1. 3
      libraries/AP_Common/AP_Common.h

3
libraries/AP_Common/AP_Common.h

@ -45,6 +45,9 @@ @@ -45,6 +45,9 @@
#define FMT_PRINTF(a,b) __attribute__((format(printf, a, b)))
#define FMT_SCANF(a,b) __attribute__((format(scanf, a, b)))
// used to forbid copy of objects
#define CLASS_NO_COPY(c) c(const c &other) = delete; c &operator=(const c&) = delete
#ifdef __has_cpp_attribute
# if __has_cpp_attribute(fallthrough)
# define FALLTHROUGH [[fallthrough]]

Loading…
Cancel
Save