Message ID | 20220519123208.3388554-1-dmalcolm@redhat.com |
---|---|
State | Superseded |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 02C3D384858A for <patchwork@sourceware.org>; Thu, 19 May 2022 12:33:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02C3D384858A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1652963624; bh=W7EThrI87b+HFb7CBeFFAPhVqutonDLf5Rb7p1zmawg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=uCmvkGLYYC9FS4XKnVECk+B1fuYAMpzQINDPe37AtqPlnKnugXp2esqDSSnhJBw4a 5twZZhQ+2W64j2kCQDJLNjbTyzwrp41qNcVkxfQA45u9D+mYwQ4sWoNG0l2rltAyRq V88C1GGYA0AcMfrkBNifzc99LcANmuyzPnMABvLo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 4693E384B82C for <gcc-patches@gcc.gnu.org>; Thu, 19 May 2022 12:32:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4693E384B82C Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-315-HqLF9k7lPcOma6T16LzBvw-1; Thu, 19 May 2022 08:32:16 -0400 X-MC-Unique: HqLF9k7lPcOma6T16LzBvw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 48D411801387 for <gcc-patches@gcc.gnu.org>; Thu, 19 May 2022 12:32:16 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.17.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5BEE401E3B; Thu, 19 May 2022 12:32:15 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/8] Move FINAL and OVERRIDE from ansidecl.h to gcc-plugin.h Date: Thu, 19 May 2022 08:32:01 -0400 Message-Id: <20220519123208.3388554-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: David Malcolm via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: David Malcolm <dmalcolm@redhat.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
[1/8] Move FINAL and OVERRIDE from ansidecl.h to gcc-plugin.h
|
|
Commit Message
David Malcolm
May 19, 2022, 12:32 p.m. UTC
As of GCC 11 onwards we have required a C++11 compiler, such as GCC 4.8
or later. On the assumption that any such compiler correctly implements
"final" and "override", this patch removes the FINAL and OVERRIDE macros
from ansidecl.h. It adds them back to gcc-plugins.h in case any plugins
make use of them.
Followup patches within this kit replace all uses of the macros in the
tree with the lower-case versions; I've split them up for ease of
review, but would apply them as one combined commit if approved.
gcc/ChangeLog:
* gcc-plugin.h: Add macros OVERRIDE and FINAL.
include/ChangeLog:
* ansidecl.h: Drop macros OVERRIDE and FINAL.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
gcc/gcc-plugin.h | 7 +++++++
include/ansidecl.h | 41 -----------------------------------------
2 files changed, 7 insertions(+), 41 deletions(-)
Comments
On Thu, 2022-05-19 at 08:32 -0400, David Malcolm wrote: > As of GCC 11 onwards we have required a C++11 compiler, such as GCC > 4.8 > or later. On the assumption that any such compiler correctly > implements > "final" and "override", this patch removes the FINAL and OVERRIDE > macros > from ansidecl.h. It adds them back to gcc-plugins.h in case any > plugins > make use of them. > > Followup patches within this kit replace all uses of the macros in > the > tree with the lower-case versions; I've split them up for ease of > review, but would apply them as one combined commit if approved. I forgot to say: I've successfully bootstrapped & regrtested the combined patches on x86_64-pc-linux-gnu, and (very) lightly tested them on aarch64-linux- gnu. Dave > > gcc/ChangeLog: > * gcc-plugin.h: Add macros OVERRIDE and FINAL. > > include/ChangeLog: > * ansidecl.h: Drop macros OVERRIDE and FINAL. > > Signed-off-by: David Malcolm <dmalcolm@redhat.com> > --- > gcc/gcc-plugin.h | 7 +++++++ > include/ansidecl.h | 41 ----------------------------------------- > 2 files changed, 7 insertions(+), 41 deletions(-) > > diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h > index ee9aa865114..f0f3049d0ce 100644 > --- a/gcc/gcc-plugin.h > +++ b/gcc/gcc-plugin.h > @@ -44,4 +44,11 @@ along with GCC; see the file COPYING3. If not see > #include "tree-check.h" > #include "plugin.h" > > +/* Versions of GCC prior to GCC 13 defined these macros in > ansidecl.h > + for C++98 compatibility. Given that we require C++11 from GCC 11 > onwards, > + keep definitions here in case plugins made use of them. */ > + > +#define OVERRIDE override > +#define FINAL final > + > #endif /* GCC_PLUGIN_H */ > diff --git a/include/ansidecl.h b/include/ansidecl.h > index efee5b6904b..119748deb68 100644 > --- a/include/ansidecl.h > +++ b/include/ansidecl.h > @@ -345,47 +345,6 @@ So instead we use the macro below and test it > against specific values. */ > #define CONSTEXPR > #endif > > -/* C++11 adds the ability to add "override" after an implementation > of a > - virtual function in a subclass, to: > - (A) document that this is an override of a virtual function > - (B) allow the compiler to issue a warning if it isn't (e.g. a > mismatch > - of the type signature). > - > - Similarly, it allows us to add a "final" to indicate that no > subclass > - may subsequently override the vfunc. > - > - Provide OVERRIDE and FINAL as macros, allowing us to get these > benefits > - when compiling with C++11 support, but without requiring C++11. > - > - For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards > enables > - this by default (actually GNU++14). */ > - > -#if defined __cplusplus > -# if __cplusplus >= 201103 > - /* C++11 claims to be available: use it. Final/override were > only > - implemented in 4.7, though. */ > -# if GCC_VERSION < 4007 > -# define OVERRIDE > -# define FINAL > -# else > -# define OVERRIDE override > -# define FINAL final > -# endif > -# elif GCC_VERSION >= 4007 > - /* G++ 4.7 supports __final in C++98. */ > -# define OVERRIDE > -# define FINAL __final > -# else > - /* No C++11 support; leave the macros empty. */ > -# define OVERRIDE > -# define FINAL > -# endif > -#else > - /* No C++11 support; leave the macros empty. */ > -# define OVERRIDE > -# define FINAL > -#endif > - > /* A macro to disable the copy constructor and assignment operator. > When building with C++11 and above, the methods are explicitly > deleted, causing a compile-time error if something tries to copy.
On Thu, May 19, 2022 at 2:33 PM David Malcolm via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > As of GCC 11 onwards we have required a C++11 compiler, such as GCC 4.8 > or later. On the assumption that any such compiler correctly implements > "final" and "override", this patch removes the FINAL and OVERRIDE macros > from ansidecl.h. It adds them back to gcc-plugins.h in case any plugins > make use of them. I don't think we need to care for that case so please do not add them to gcc-plugins.h. But ansidecl.h is shared between gcc and binutils/gdb (and libiberty in general), can you get an ack from their side as well please? Thanks, Richard. > Followup patches within this kit replace all uses of the macros in the > tree with the lower-case versions; I've split them up for ease of > review, but would apply them as one combined commit if approved. > > gcc/ChangeLog: > * gcc-plugin.h: Add macros OVERRIDE and FINAL. > > include/ChangeLog: > * ansidecl.h: Drop macros OVERRIDE and FINAL. > > Signed-off-by: David Malcolm <dmalcolm@redhat.com> > --- > gcc/gcc-plugin.h | 7 +++++++ > include/ansidecl.h | 41 ----------------------------------------- > 2 files changed, 7 insertions(+), 41 deletions(-) > > diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h > index ee9aa865114..f0f3049d0ce 100644 > --- a/gcc/gcc-plugin.h > +++ b/gcc/gcc-plugin.h > @@ -44,4 +44,11 @@ along with GCC; see the file COPYING3. If not see > #include "tree-check.h" > #include "plugin.h" > > +/* Versions of GCC prior to GCC 13 defined these macros in ansidecl.h > + for C++98 compatibility. Given that we require C++11 from GCC 11 onwards, > + keep definitions here in case plugins made use of them. */ > + > +#define OVERRIDE override > +#define FINAL final > + > #endif /* GCC_PLUGIN_H */ > diff --git a/include/ansidecl.h b/include/ansidecl.h > index efee5b6904b..119748deb68 100644 > --- a/include/ansidecl.h > +++ b/include/ansidecl.h > @@ -345,47 +345,6 @@ So instead we use the macro below and test it against specific values. */ > #define CONSTEXPR > #endif > > -/* C++11 adds the ability to add "override" after an implementation of a > - virtual function in a subclass, to: > - (A) document that this is an override of a virtual function > - (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch > - of the type signature). > - > - Similarly, it allows us to add a "final" to indicate that no subclass > - may subsequently override the vfunc. > - > - Provide OVERRIDE and FINAL as macros, allowing us to get these benefits > - when compiling with C++11 support, but without requiring C++11. > - > - For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables > - this by default (actually GNU++14). */ > - > -#if defined __cplusplus > -# if __cplusplus >= 201103 > - /* C++11 claims to be available: use it. Final/override were only > - implemented in 4.7, though. */ > -# if GCC_VERSION < 4007 > -# define OVERRIDE > -# define FINAL > -# else > -# define OVERRIDE override > -# define FINAL final > -# endif > -# elif GCC_VERSION >= 4007 > - /* G++ 4.7 supports __final in C++98. */ > -# define OVERRIDE > -# define FINAL __final > -# else > - /* No C++11 support; leave the macros empty. */ > -# define OVERRIDE > -# define FINAL > -# endif > -#else > - /* No C++11 support; leave the macros empty. */ > -# define OVERRIDE > -# define FINAL > -#endif > - > /* A macro to disable the copy constructor and assignment operator. > When building with C++11 and above, the methods are explicitly > deleted, causing a compile-time error if something tries to copy. > -- > 2.26.3 >
On Thu, May 19, 2022 at 2:43 PM David Malcolm via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > On Thu, 2022-05-19 at 08:32 -0400, David Malcolm wrote: > > As of GCC 11 onwards we have required a C++11 compiler, such as GCC > > 4.8 > > or later. On the assumption that any such compiler correctly > > implements > > "final" and "override", this patch removes the FINAL and OVERRIDE > > macros > > from ansidecl.h. It adds them back to gcc-plugins.h in case any > > plugins > > make use of them. > > > > Followup patches within this kit replace all uses of the macros in > > the > > tree with the lower-case versions; I've split them up for ease of > > review, but would apply them as one combined commit if approved. > > I forgot to say: > I've successfully bootstrapped & regrtested the combined patches on > x86_64-pc-linux-gnu, and (very) lightly tested them on aarch64-linux- > gnu. And I forgot to say - the patches doing the replacement are fine en-bloc Thanks, Richard. > Dave > > > > > gcc/ChangeLog: > > * gcc-plugin.h: Add macros OVERRIDE and FINAL. > > > > include/ChangeLog: > > * ansidecl.h: Drop macros OVERRIDE and FINAL. > > > > Signed-off-by: David Malcolm <dmalcolm@redhat.com> > > --- > > gcc/gcc-plugin.h | 7 +++++++ > > include/ansidecl.h | 41 ----------------------------------------- > > 2 files changed, 7 insertions(+), 41 deletions(-) > > > > diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h > > index ee9aa865114..f0f3049d0ce 100644 > > --- a/gcc/gcc-plugin.h > > +++ b/gcc/gcc-plugin.h > > @@ -44,4 +44,11 @@ along with GCC; see the file COPYING3. If not see > > #include "tree-check.h" > > #include "plugin.h" > > > > +/* Versions of GCC prior to GCC 13 defined these macros in > > ansidecl.h > > + for C++98 compatibility. Given that we require C++11 from GCC 11 > > onwards, > > + keep definitions here in case plugins made use of them. */ > > + > > +#define OVERRIDE override > > +#define FINAL final > > + > > #endif /* GCC_PLUGIN_H */ > > diff --git a/include/ansidecl.h b/include/ansidecl.h > > index efee5b6904b..119748deb68 100644 > > --- a/include/ansidecl.h > > +++ b/include/ansidecl.h > > @@ -345,47 +345,6 @@ So instead we use the macro below and test it > > against specific values. */ > > #define CONSTEXPR > > #endif > > > > -/* C++11 adds the ability to add "override" after an implementation > > of a > > - virtual function in a subclass, to: > > - (A) document that this is an override of a virtual function > > - (B) allow the compiler to issue a warning if it isn't (e.g. a > > mismatch > > - of the type signature). > > - > > - Similarly, it allows us to add a "final" to indicate that no > > subclass > > - may subsequently override the vfunc. > > - > > - Provide OVERRIDE and FINAL as macros, allowing us to get these > > benefits > > - when compiling with C++11 support, but without requiring C++11. > > - > > - For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards > > enables > > - this by default (actually GNU++14). */ > > - > > -#if defined __cplusplus > > -# if __cplusplus >= 201103 > > - /* C++11 claims to be available: use it. Final/override were > > only > > - implemented in 4.7, though. */ > > -# if GCC_VERSION < 4007 > > -# define OVERRIDE > > -# define FINAL > > -# else > > -# define OVERRIDE override > > -# define FINAL final > > -# endif > > -# elif GCC_VERSION >= 4007 > > - /* G++ 4.7 supports __final in C++98. */ > > -# define OVERRIDE > > -# define FINAL __final > > -# else > > - /* No C++11 support; leave the macros empty. */ > > -# define OVERRIDE > > -# define FINAL > > -# endif > > -#else > > - /* No C++11 support; leave the macros empty. */ > > -# define OVERRIDE > > -# define FINAL > > -#endif > > - > > /* A macro to disable the copy constructor and assignment operator. > > When building with C++11 and above, the methods are explicitly > > deleted, causing a compile-time error if something tries to copy. > >
On Thu, 2022-05-19 at 14:45 +0200, Richard Biener wrote: > On Thu, May 19, 2022 at 2:43 PM David Malcolm via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > > > On Thu, 2022-05-19 at 08:32 -0400, David Malcolm wrote: > > > As of GCC 11 onwards we have required a C++11 compiler, such as > > > GCC > > > 4.8 > > > or later. On the assumption that any such compiler correctly > > > implements > > > "final" and "override", this patch removes the FINAL and OVERRIDE > > > macros > > > from ansidecl.h. It adds them back to gcc-plugins.h in case any > > > plugins > > > make use of them. > > > > > > Followup patches within this kit replace all uses of the macros > > > in > > > the > > > tree with the lower-case versions; I've split them up for ease of > > > review, but would apply them as one combined commit if approved. > > > > I forgot to say: > > I've successfully bootstrapped & regrtested the combined patches on > > x86_64-pc-linux-gnu, and (very) lightly tested them on aarch64- > > linux- > > gnu. > > And I forgot to say - the patches doing the replacement are fine en- > bloc Thanks. I merged those parts of the kit (patches 2-8, replacing the macros uses with the lower-case specifiers directly) into one patch, retested with just that, and have pushed it to trunk as r13-690- gff171cb13df671. I plan to look at the libiberty discussion early next week. Dave > > Thanks, > Richard. > > > Dave > > > > > > > > gcc/ChangeLog: > > > * gcc-plugin.h: Add macros OVERRIDE and FINAL. > > > > > > include/ChangeLog: > > > * ansidecl.h: Drop macros OVERRIDE and FINAL. > > > > > > Signed-off-by: David Malcolm <dmalcolm@redhat.com> > > > --- > > > gcc/gcc-plugin.h | 7 +++++++ > > > include/ansidecl.h | 41 ---------------------------------------- > > > - > > > 2 files changed, 7 insertions(+), 41 deletions(-) > > > > > > diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h > > > index ee9aa865114..f0f3049d0ce 100644 > > > --- a/gcc/gcc-plugin.h > > > +++ b/gcc/gcc-plugin.h > > > @@ -44,4 +44,11 @@ along with GCC; see the file COPYING3. If not > > > see > > > #include "tree-check.h" > > > #include "plugin.h" > > > > > > +/* Versions of GCC prior to GCC 13 defined these macros in > > > ansidecl.h > > > + for C++98 compatibility. Given that we require C++11 from > > > GCC 11 > > > onwards, > > > + keep definitions here in case plugins made use of them. */ > > > + > > > +#define OVERRIDE override > > > +#define FINAL final > > > + > > > #endif /* GCC_PLUGIN_H */ > > > diff --git a/include/ansidecl.h b/include/ansidecl.h > > > index efee5b6904b..119748deb68 100644 > > > --- a/include/ansidecl.h > > > +++ b/include/ansidecl.h > > > @@ -345,47 +345,6 @@ So instead we use the macro below and test > > > it > > > against specific values. */ > > > #define CONSTEXPR > > > #endif > > > > > > -/* C++11 adds the ability to add "override" after an > > > implementation > > > of a > > > - virtual function in a subclass, to: > > > - (A) document that this is an override of a virtual function > > > - (B) allow the compiler to issue a warning if it isn't (e.g. > > > a > > > mismatch > > > - of the type signature). > > > - > > > - Similarly, it allows us to add a "final" to indicate that no > > > subclass > > > - may subsequently override the vfunc. > > > - > > > - Provide OVERRIDE and FINAL as macros, allowing us to get > > > these > > > benefits > > > - when compiling with C++11 support, but without requiring > > > C++11. > > > - > > > - For gcc, use "-std=c++11" to enable C++11 support; gcc 6 > > > onwards > > > enables > > > - this by default (actually GNU++14). */ > > > - > > > -#if defined __cplusplus > > > -# if __cplusplus >= 201103 > > > - /* C++11 claims to be available: use it. Final/override were > > > only > > > - implemented in 4.7, though. */ > > > -# if GCC_VERSION < 4007 > > > -# define OVERRIDE > > > -# define FINAL > > > -# else > > > -# define OVERRIDE override > > > -# define FINAL final > > > -# endif > > > -# elif GCC_VERSION >= 4007 > > > - /* G++ 4.7 supports __final in C++98. */ > > > -# define OVERRIDE > > > -# define FINAL __final > > > -# else > > > - /* No C++11 support; leave the macros empty. */ > > > -# define OVERRIDE > > > -# define FINAL > > > -# endif > > > -#else > > > - /* No C++11 support; leave the macros empty. */ > > > -# define OVERRIDE > > > -# define FINAL > > > -#endif > > > - > > > /* A macro to disable the copy constructor and assignment > > > operator. > > > When building with C++11 and above, the methods are > > > explicitly > > > deleted, causing a compile-time error if something tries to > > > copy. > > > > >
diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h index ee9aa865114..f0f3049d0ce 100644 --- a/gcc/gcc-plugin.h +++ b/gcc/gcc-plugin.h @@ -44,4 +44,11 @@ along with GCC; see the file COPYING3. If not see #include "tree-check.h" #include "plugin.h" +/* Versions of GCC prior to GCC 13 defined these macros in ansidecl.h + for C++98 compatibility. Given that we require C++11 from GCC 11 onwards, + keep definitions here in case plugins made use of them. */ + +#define OVERRIDE override +#define FINAL final + #endif /* GCC_PLUGIN_H */ diff --git a/include/ansidecl.h b/include/ansidecl.h index efee5b6904b..119748deb68 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -345,47 +345,6 @@ So instead we use the macro below and test it against specific values. */ #define CONSTEXPR #endif -/* C++11 adds the ability to add "override" after an implementation of a - virtual function in a subclass, to: - (A) document that this is an override of a virtual function - (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch - of the type signature). - - Similarly, it allows us to add a "final" to indicate that no subclass - may subsequently override the vfunc. - - Provide OVERRIDE and FINAL as macros, allowing us to get these benefits - when compiling with C++11 support, but without requiring C++11. - - For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables - this by default (actually GNU++14). */ - -#if defined __cplusplus -# if __cplusplus >= 201103 - /* C++11 claims to be available: use it. Final/override were only - implemented in 4.7, though. */ -# if GCC_VERSION < 4007 -# define OVERRIDE -# define FINAL -# else -# define OVERRIDE override -# define FINAL final -# endif -# elif GCC_VERSION >= 4007 - /* G++ 4.7 supports __final in C++98. */ -# define OVERRIDE -# define FINAL __final -# else - /* No C++11 support; leave the macros empty. */ -# define OVERRIDE -# define FINAL -# endif -#else - /* No C++11 support; leave the macros empty. */ -# define OVERRIDE -# define FINAL -#endif - /* A macro to disable the copy constructor and assignment operator. When building with C++11 and above, the methods are explicitly deleted, causing a compile-time error if something tries to copy.