[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 timon.g...@gmx.ch changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #5 from Vladimir Panteleev thecybersha...@gmail.com 2014-03-02 22:40:18 EET --- Regardless of whether the two issues describe different problems, the pull in issue 11545 fixes compilation of the code in this issue as well. --

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #6 from timon.g...@gmx.ch 2014-03-02 12:48:10 PST --- (In reply to comment #5) Regardless of whether the two issues describe different problems, the pull in issue 11545 fixes compilation of the code in this issue as well. 1.

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #9 from Vladimir Panteleev thecybersha...@gmail.com 2014-03-02 22:53:58 EET --- Yes. And function literals are now allowed. But not delegate literals. -- Configure issuemail:

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #7 from Vladimir Panteleev thecybersha...@gmail.com 2014-03-02 22:51:56 EET --- No. But I think that is a separate issue. Your original report and test code only concerned functions, which did not require a context. -- Configure

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
, the title of this issue is 'remove function literals cannot be class members annoyance'. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
$ grep function literals cannot be *.c func.c:error(function literals cannot be class members); -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #11 from Vladimir Panteleev thecybersha...@gmail.com 2014-03-02 23:00:57 EET --- The pull isn't merged yet. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #12 from timon.g...@gmx.ch 2014-03-02 13:06:00 PST --- (In reply to comment #11) The pull isn't merged yet. I am sorry I was not making myself very clear, but surely the right way to get rid of the function literals cannot

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #13 from Vladimir Panteleev thecybersha...@gmail.com 2014-03-02 23:12:36 EET --- Sorry, there does appear to be a misunderstanding. I am referring to the code in the issue description: (In reply to comment #0) class C{

[Issue 7653] remove function literals cannot be class members annoyance

2014-03-02 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 timon.g...@gmx.ch changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|

[Issue 7653] remove function literals cannot be class members annoyance

2014-02-03 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added CC|

[Issue 7653] remove function literals cannot be class members annoyance

2014-02-03 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 --- Comment #2 from Vladimir Panteleev thecybersha...@gmail.com 2014-02-03 16:08:25 EET --- Sorry, that's not right. I forgot the parens. enum x = { return 5; }(); // allowed struct S { enum y = { return 5; }(); // forbidden } --

[Issue 7653] remove function literals cannot be class members annoyance

2014-02-03 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7653 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: function literals cannot be class members

2011-09-23 Thread d coder
On Mon, Jul 18, 2011 at 8:18 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: [snip..] We need to keep this key strategic advantage. First off, the fact that this code isn't accepted: BinaryHeap!(uint[], function (a, b) {return a b;}) heap; is a clear bug. Worst case,

Re: function literals cannot be class members

2011-07-20 Thread Mehrdad
On 7/18/2011 6:21 AM, Steven Schveighoffer wrote: I'm actually still confused at why _functions_ should be passed as template parameters The beauty of alias parameters snip ... the beauty? Please excuse me my tone becomes a bit rant-y, but I was asking _why_, and the reason is just...

Re: function literals cannot be class members

2011-07-20 Thread Steven Schveighoffer
On Wed, 20 Jul 2011 03:03:26 -0400, Mehrdad wfunct...@hotmail.com wrote: On 7/18/2011 6:21 AM, Steven Schveighoffer wrote: I'm actually still confused at why _functions_ should be passed as template parameters The beauty of alias parameters snip ... the beauty? Please excuse me my tone

Re: function literals cannot be class members

2011-07-18 Thread Steven Schveighoffer
On Sun, 17 Jul 2011 09:49:52 -0400, d coder dlang.co...@gmail.com wrote: Greetings Sure, this does not solve the original problem, if it was really an issue. @d coder: do you have an example where runtime changing of the comparison function behavior would be required? While I do, I

Re: function literals cannot be class members

2011-07-18 Thread Andrei Alexandrescu
On 7/18/11 8:21 AM, Steven Schveighoffer wrote: On Sun, 17 Jul 2011 09:49:52 -0400, d coder dlang.co...@gmail.com wrote: class Foo { BinaryHeap!(uint[], function (a, b) {return a b;}) heap; // .. } You get another Error: this for __funcliteral1 needs to be type Foo not type

Re: function literals cannot be class members

2011-07-17 Thread Mehrdad
On 7/16/2011 2:01 PM, Andrei Alexandrescu wrote: On 7/16/11 10:50 AM, d coder wrote: Sorry for bumping. Want to know if there is a solution to the situation I face often. I think this is a reasonable thing to want, but it's difficult to implement technically. You want a comparitor with state

Re: function literals cannot be class members

2011-07-17 Thread Timon Gehr
Mehrdad wrote: On 7/16/2011 2:01 PM, Andrei Alexandrescu wrote: On 7/16/11 10:50 AM, d coder wrote: Sorry for bumping. Want to know if there is a solution to the situation I face often. I think this is a reasonable thing to want, but it's difficult to implement technically. You want a

Re: function literals cannot be class members

2011-07-17 Thread d coder
Greetings Sure, this does not solve the original problem, if it was really an issue. @d coder: do you have an example where runtime changing of the comparison function behavior would be required? While I do, I am sure there are alternative ways to program to avoid needing those. But I

function literals cannot be class members

2011-07-16 Thread d coder
Greetings I have experienced that it becomes quite difficult to instantiate certain template structs/classes as members of another class/struct, when function/delegate need to be passed as a template parameter to the instantiated templates. For example if I wish to instantiate a binary heap, and

Re: function literals cannot be class members

2011-07-16 Thread d coder
Sorry for bumping. Want to know if there is a solution to the situation I face often.

Re: function literals cannot be class members

2011-07-16 Thread Andrei Alexandrescu
On 7/16/11 10:50 AM, d coder wrote: Sorry for bumping. Want to know if there is a solution to the situation I face often. I think this is a reasonable thing to want, but it's difficult to implement technically. You want a comparitor with state (which is fine), but at the same time the state