Greetings,
I am working on user-defined literals and have much of it working.
I am stuck on template function calls though.
If I have a literal oprator like this:
template
int
operator"" _abc()
{ return 42 + sizeof...(Chars); }
Then later on I see this:
int j = 123_abc;
I need to look
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
> - 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,
&
gt;> - Original Message -----
>>> From: Ed Smith-Rowland<3dw...@verizon.net>
>>> To: gcc@gcc.gnu.org
>>> Subject: [C++-0X] User-defined literals
>>> Date: Mon, 28 Mar 2011 20:13:19 -0400
>>>
>>>
>>> Greetings,
>>>
maybe you would be interested in mentoring me and we
could combine our efforts.
Kind regards,
Levon
- Original Message -
From: Ed Smith-Rowland<3dw...@verizon.net>
To: gcc@gcc.gnu.org
Subject: [C++-0X] User-defined literals
Date: Mon, 28 Mar 2011 20:13:19 -0400
Greetings,
I am
and we
could combine our efforts.
Kind regards,
Levon
> - Original Message -
> From: Ed Smith-Rowland <3dw...@verizon.net>
> To: gcc@gcc.gnu.org
> Subject: [C++-0X] User-defined literals
> Date: Mon, 28 Mar 2011 20:13:19 -0400
>
>
> Greetings,
>
> I
Greetings,
I am taking a new shot at user-defined literals.
Compared to the previous attempt:
* I have altered libcpp so that it tokenizes user defined literals in
one chunk properly.
* I have started work on new tree nodes and accessors.
* I have (or am trying to) refine the checks for a
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
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
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
This is to get a paper trail started.
TODO: Find out if/what LTO issues there may be with user-defined literals.
Ed
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
> 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
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 "
> 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
> 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
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
> 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.
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.
Greetings,
I am slowly working on user defined literals for C++-0x.
This is my first foray into the C++ front end and I'm stuck.
Anyway, I managed to parse things like
long double
operator"" _foo(long double x) { return 2.0L * x; }
The result is a normal function that I can either call li
20 matches
Mail list logo