This is the mail archive of the
mailing list for the GCC project.
Re: Patch for constexpr variable templates
- From: Braden Obrzut <admin at maniacsvault dot net>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Adam Butcher <adam at jessamine dot co dot uk>, Andrew Sutton <andrew dot n dot sutton at gmail dot com>, Ed Smith-Rowland <3dw4rd at verizon dot net>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Jul 2014 17:33:39 -0400
- Subject: Re: Patch for constexpr variable templates
- Authentication-results: sourceware.org; auth=none
- References: <53CCFBEF dot 9080804 at verizon dot net> <53CDD522 dot 9040508 at maniacsvault dot net> <53D172E4 dot 9020902 at redhat dot com> <53D242FD dot 70002 at maniacsvault dot net> <53D2CB20 dot 1090201 at redhat dot com> <53D352F7 dot 7040402 at maniacsvault dot net> <53D3D34A dot 9080009 at redhat dot com> <53D3D3D9 dot 9000102 at redhat dot com> <0d580e6525100d13a49b2c9327c727f8 at imap dot force9 dot net> <CANq5SytLmkHuCF916K_QG31PTovq1Hir5Q76dJmY8Zce76R0Cg at mail dot gmail dot com> <280a4c80527b753476c274f90ab92fa6 at imap dot force9 dot net> <53D5B03D dot 1010300 at maniacsvault dot net> <53D688DE dot 6020001 at redhat dot com> <53D78C0B dot 10701 at maniacsvault dot net> <53D9591B dot 9020402 at redhat dot com>
On 07/30/2014 04:44 PM, Jason Merrill wrote:
I did mention this in the original mail, is this definitely the way it
should be done? Andrew pointed this out to me before sending in the
patch, my initial investigation into doing so seemed to show it would
require more changes than doing it later since that would mean that
cp_parser_id_expression has another possible return type (to be fair, I
didn't carry out a full implementation). What I'm doing is equivalent
to the point where function templates are instantiated so it could go
either way, but from what I understand the only reason function
templates are handled like that is because of overload resolution? My
implementation strategy thus far has been to mirror function templates
as long as possible.
Why not do this in cp_parser_id_expression?
- Braden Obrzut