This is the mail archive of the
mailing list for the GCC project.
Re: Re: [C++-11] User defined literals
- From: 3dw4rd at verizon dot net
- To: jason at redhat dot com
- Cc: tromey at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Oct 2011 15:11:08 -0500 (CDT)
- Subject: Re: Re: [C++-11] User defined literals
Oct 26, 2011 03:39:09 PM, firstname.lastname@example.org wrote:
On 10/26/2011 02:00 AM, Ed Smith-Rowland wrote:
> The patch was bootstrapped and regtested on x86_64-linux-gnu.
Really? I ran into a warning about the unused "suffix" parameter to
interpret_integer. So I've fixed that error. I also added a couple of
comments, and implemented the change to check_literal_operator_args that
I wondered about a while back. And checked it all in.
But we aren't quite done, I think: I notice that the lookup of operators
doesn't match what's in 2.14.8. For instance, I don't think this should
double operator"" _foo (long long unsigned);
double d = 1.2_foo;
The lookup described in 2.14.8 involves looking through the overload set
for a particular signature before doing normal overload resolution.
Also, we don't need to worry about argument-dependent lookup for these
operators, since none of the arguments can have associated namespaces.
So I think we can use lookup_name rather than lookup_function_nonclass,
only look it up once in cp_userdef_numeric_literal, and then only build
one call depending on the contents of the overload set.
Thank you Jason and Tom for your help in getting this together an putting up with my slowness.
That warning about unused suffix didn't blow up the build. I'm surprised Werror didn't kill it.
I'll check out these other issues as soon as I clean out all my work and rebuild on a clean tree.
I guess I need to look at what kind of number I get when processing a numeric literal.