Repository: kudu Updated Branches: refs/heads/master ff38c6b5a -> e367b4e0b
Use C++11 constructor deletion for DISALLOW_COPY_AND_ASSIGN Change-Id: Ida3f92ee9651d4540c886a5e7846bff0eedbb226 Reviewed-on: http://gerrit.cloudera.org:8080/5781 Reviewed-by: Dan Burkert <[email protected]> Tested-by: Kudu Jenkins Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/6719da04 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/6719da04 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/6719da04 Branch: refs/heads/master Commit: 6719da0449e22dfc1055ded08f276b351003a3f3 Parents: ff38c6b Author: Todd Lipcon <[email protected]> Authored: Tue Jan 24 11:33:06 2017 -0800 Committer: Todd Lipcon <[email protected]> Committed: Tue Jan 24 21:46:01 2017 +0000 ---------------------------------------------------------------------- src/kudu/gutil/macros.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/6719da04/src/kudu/gutil/macros.h ---------------------------------------------------------------------- diff --git a/src/kudu/gutil/macros.h b/src/kudu/gutil/macros.h index 7ebb4b4..f271bd4 100644 --- a/src/kudu/gutil/macros.h +++ b/src/kudu/gutil/macros.h @@ -93,21 +93,10 @@ struct CompileAssert { // Note, that most uses of DISALLOW_ASSIGN and DISALLOW_COPY are broken // semantically, one should either use disallow both or neither. Try to // avoid these in new code. -// -// The LANG_CXX11 branch is a workaround for -// http://gcc.gnu.org/PR51213 in gcc-4.7 / Crosstool v16. -// TODO(user): Remove "&& !defined(__clang_)" when =delete is -// gcc-4.7 before =delete is allowed, go back to the C++98 definition. #ifndef DISALLOW_COPY_AND_ASSIGN -#if LANG_CXX11 && !defined(__clang__) #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ void operator=(const TypeName&) = delete -#else -#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - TypeName(const TypeName&); \ - void operator=(const TypeName&) -#endif #endif // An older, politically incorrect name for the above. @@ -121,7 +110,7 @@ struct CompileAssert { // that wants to prevent anyone from instantiating it. This is // especially useful for classes containing only static methods. #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ - TypeName(); \ + TypeName() = delete; \ DISALLOW_COPY_AND_ASSIGN(TypeName) // The arraysize(arr) macro returns the # of elements in an array arr.
