Re: [C++-0X] User-defined literals

2011-03-30 Thread Jason Merrill
On 03/28/2011 08:13 PM, Ed Smith-Rowland wrote: Please CC me on C++ questions, as I don't keep up with the mailing list very well. I would like to check that template literal operators have the specific non-type parameter pack: template Foo operator"" sluggo(); I looked through the internals

Re: [C++-0X] User-defined literals, gsoc

2011-03-29 Thread Levon Haykazyan
> - Original Message - > From: Ed Smith-Rowland <3dw...@verizon.net> > To: gcc@gcc.gnu.org > Subject: Re: [C++-0X] User-defined literals, gsoc > Date: Tue, 29 Mar 2011 10:16:52 -0400 > > > On 03/29/2011 10:05 AM, Levon Haykazyan wrote: > > Hi Ed, &

Re: [C++-0X] User-defined literals, gsoc

2011-03-29 Thread James Dennett
On Tue, Mar 29, 2011 at 2:16 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: > On 03/29/2011 10:05 AM, Levon Haykazyan wrote: >> >> Hi Ed, >> >> I am working on a proposal to implement user-defined literals as a Google >> Summer of Code project. I was unaware that someone was already working on >>

Re: [C++-0X] User-defined literals, gsoc

2011-03-29 Thread Ed Smith-Rowland
On 03/29/2011 10:05 AM, Levon Haykazyan wrote: Hi Ed, I am working on a proposal to implement user-defined literals as a Google Summer of Code project. I was unaware that someone was already working on it. If you have already done some work, maybe it is better for me to pick another project. Or

Re: [C++-0X] User-defined literals, gsoc

2011-03-29 Thread Levon Haykazyan
Hi Ed, I am working on a proposal to implement user-defined literals as a Google Summer of Code project. I was unaware that someone was already working on it. If you have already done some work, maybe it is better for me to pick another project. Or maybe you would be interested in mentoring me and

Re: [C++-0x] User-defined literals.

2010-10-04 Thread Jason Merrill
On 10/04/2010 02:16 PM, 3dw...@verizon.net wrote: You shouldn't be able to call it as just _foo(1.2L); an operator name is different from a normal function name. According to 13.5.8/7 : [ Note: literal operators and literal operator templates are usually invoked implicitly through user-defi

Re: Re: [C++-0x] User-defined literals.

2010-10-04 Thread 3dw4rd
Oct 4, 2010 11:26:15 AM, ja...@redhat.com wrote: >On 09/17/2010 02:25 AM, Ed Smith-Rowland wrote: >> I am slowly working on user defined literals for C++-0x. > >Thanks! Please send future patches to gcc-patches and me directly. > >Looking over your patch, I see you're doing a significant amount o

Re: [C++-0x] User-defined literals.

2010-10-04 Thread Jason Merrill
On 09/17/2010 02:25 AM, Ed Smith-Rowland wrote: I am slowly working on user defined literals for C++-0x. Thanks! Please send future patches to gcc-patches and me directly. Looking over your patch, I see you're doing a significant amount of it in the parser, which is incorrect; the draft says

Re: [C++-0x] User-defined literals.

2010-09-21 Thread Ed Smith-Rowland
This is to get a paper trail started. TODO: Find out if/what LTO issues there may be with user-defined literals. Ed

Re: [C++-0x] User-defined literals.

2010-09-21 Thread Ed Smith-Rowland
On 09/21/2010 06:47 PM, Rodrigo Rivas wrote: I'm holding out for rolling back the lexer in some way that won't break everything and emitting the (unrecognized by cpp ) suffix as a separate identifier token. I'm thinking the cp_lexer_* routines or maybe a new one in parser.c would be worth try

Re: Re: [C++-0x] User-defined literals.

2010-09-21 Thread Rodrigo Rivas
> I'm holding out for rolling back the lexer in some way that won't break > everything and emitting the (unrecognized by cpp ) suffix as a separate > identifier token.  I'm thinking the cp_lexer_* routines or maybe a new one in > parser.c would be worth trying.  Then the code I have now would ju

Re: Re: [C++-0x] User-defined literals.

2010-09-21 Thread 3dw4rd
Sep 21, 2010 03:56:25 PM, rodrigorivasco...@gmail.com wrote: >> 3. The big one: Getting the integer(long long) and float(long double) >> suffixes that are not used by gcc out of the preprocessor. Then we >can >> build the calls. > >Just my two cents: >Add an output parameter to the function "

Re: [C++-0x] User-defined literals.

2010-09-21 Thread Rodrigo Rivas
> 3. The big one: Getting the integer(long long) and float(long double) > suffixes that are not used by gcc out of the preprocessor.  Then we can > build the calls. Just my two cents: Add an output parameter to the function "cpp_classify_number()" (libcpp/expr.c) to get the user-defined suffix. It

Re: [C++-0x] User-defined literals.

2010-09-20 Thread Rodrigo Rivas
> I'm looking at (besides input on what I've got currently): So far I see it fine... except: int len = TREE_STRING_LENGTH (strl); should be: int len = TREE_STRING_LENGTH (strl) - 1; since the draft says "its length excluding the terminating null character". Also, I had to c

Re: [C++-0x] User-defined literals.

2010-09-19 Thread Ed Smith-Rowland
On 09/19/2010 02:37 PM, Rodrigo Rivas wrote: Maybe Rodrigo would be interested in collaborating on this work? Sure I am! Please, let me a couple of days to re-read the C++ draft, and check this patch. Also, take in account that I'm in no way a GCC expert... but I'll do my best. Also I hav

Re: [C++-0x] User-defined literals.

2010-09-19 Thread Rodrigo Rivas
> Maybe Rodrigo would be interested in collaborating on this work? Sure I am! Please, let me a couple of days to re-read the C++ draft, and check this patch. Also, take in account that I'm in no way a GCC expert... but I'll do my best. Also I have a little patch on my own that might use some help.

Re: [C++-0x] User-defined literals.

2010-09-19 Thread Paolo Carlini
On 09/17/2010 08:25 AM, Ed Smith-Rowland wrote: > Thanks for any help you can give, Maybe Rodrigo would be interested in collaborating on this work? Rodrigo? Thanks, Paolo.