Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69e55e74 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "Libbase: add C++11 support to DISALLOW_IMPLICIT_CONSTRUCTORS" am:...

Merge "Libbase: add C++11 support to DISALLOW_IMPLICIT_CONSTRUCTORS" am: e7f3a0f9 am: f4878c6b am: 95606ec9
am: 5fc94d2c

Change-Id: Ifc6c04a0c1451d1419bb6ed906f66973777d8c5a
parents d552585d 5fc94d2c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -60,9 +60,18 @@
// This should be used in the private: declarations for a class
// that wants to prevent anyone from instantiating it. This is
// especially useful for classes containing only static methods.
//
// When building with C++11 toolchains, just use the language support
// for explicitly deleted methods.
#if __cplusplus >= 201103L
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
  TypeName() = delete;                           \
  DISALLOW_COPY_AND_ASSIGN(TypeName)
#else
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
  TypeName();                                    \
  DISALLOW_COPY_AND_ASSIGN(TypeName)
#endif

// The arraysize(arr) macro returns the # of elements in an array arr.
// The expression is a compile-time constant, and therefore can be