This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: CONSTEXPR macro (was "Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h")
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, jit at gcc dot gnu dot org
- Date: Fri, 6 May 2016 18:37:05 +0200
- Subject: Re: CONSTEXPR macro (was "Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h")
- Authentication-results: sourceware.org; auth=none
- References: <1462552846-17096-1-git-send-email-dmalcolm at redhat dot com> <20160506162052 dot GR26501 at tucnak dot zalov dot cz> <1462552367 dot 14738 dot 54 dot camel at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, May 06, 2016 at 12:32:47PM -0400, David Malcolm wrote:
> Perhaps, but CONSTEXPR seems to be more awkward than OVERRIDE and
> FINAL. The meanings of "final" and "override" are consistent between
> C++11 and C++14, but C++14 allows more things to be marked as
> "constexpr" than C++11. Hence having a single "CONSTEXPR" macro might
> not be sufficient. Perhaps there'd be CONSTEXPR_11 and CONSTEXPR_14
> macros for things that are constexpr in C++11 onwards and constexpr in
> C++14 onwards, respectively? (seems ugly to me).
Yeah, or CONSTEXPR and CONSTEXPR14 could work, sure.
> Are the OVERRIDE and FINAL macros OK for trunk?
Yes.
Jakub