[include] Add macro DISABLE_COPY_AND_ASSIGN
authorYao Qi <yao.qi@linaro.org>
Fri, 15 Sep 2017 15:40:50 +0000 (15:40 +0000)
committerYao Qi <qiyao@gcc.gnu.org>
Fri, 15 Sep 2017 15:40:50 +0000 (15:40 +0000)
commit681f5b7cc8e80ef09f4692fac5bf3824e4854d54
treedfc46c853b094c05f63c142a46308c2f86a5503d
parentefae2b2f9b70196b6e282a2cebb97b6f00714a36
[include] Add macro DISABLE_COPY_AND_ASSIGN

We have many classes that copy cotr and assignment operator are deleted
in different projects, gcc, gdb and gold.  So this patch adds a macro
to do this, and replace these existing mechanical code with macro
DISABLE_COPY_AND_ASSIGN.

The patch was posted in gdb-patches,
https://sourceware.org/ml/gdb-patches/2017-07/msg00254.html but we
think it is better to put this macro in include/ansidecl.h so that
other projects can use it too.

include:

2017-09-15  Yao Qi  <yao.qi@linaro.org>
    Pedro Alves  <palves@redhat.com>

* ansidecl.h (DISABLE_COPY_AND_ASSIGN): New macro.

Co-Authored-By: Pedro Alves <palves@redhat.com>
From-SVN: r252823
include/ChangeLog
include/ansidecl.h