Jacob Carlborg d...@me.com wrote in message
news:i5t61q$2j7...@digitalmars.com...
If you're not going to modify the content of the array I think this will
work:
void foo (T) (const(T)[] collection, T elem) {}
This will allow both mutable, immutable and const arrays. But it will not
let
On 9/11/2010 9:32 PM, Nick Sabalausky wrote:
Jacob Carlborg d...@me.com wrote in message
news:i5t61q$2j7...@digitalmars.com...
If you're not going to modify the content of the array I think this will
work:
void foo (T) (const(T)[] collection, T elem) {}
This will allow both mutable,
On Tue, 07 Sep 2010 14:06:58 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Tue, 07 Sep 2010 11:37:20 -0400, Pelle pelle.mans...@gmail.com
wrote:
On 09/07/2010 04:33 PM, Steven Schveighoffer wrote:
Yes, a valid return. Your function should be:
void foo(void delegate(const(C)
On 09/08/2010 02:24 PM, Steven Schveighoffer wrote:
On Tue, 07 Sep 2010 14:06:58 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Tue, 07 Sep 2010 11:37:20 -0400, Pelle pelle.mans...@gmail.com
wrote:
On 09/07/2010 04:33 PM, Steven Schveighoffer wrote:
Yes, a valid return. Your
On 2010-09-07 14:49, Steven Schveighoffer wrote:
On Sun, 05 Sep 2010 09:40:59 -0400, BLS windev...@hotmail.de wrote:
On 05/09/2010 02:16, Jonathan M Davis wrote:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
I am curious, how this will look and feel once inout is working ?
On Tue, 07 Sep 2010 08:56:15 -0400, Jacob Carlborg d...@me.com wrote:
On 2010-09-07 14:49, Steven Schveighoffer wrote:
On Sun, 05 Sep 2010 09:40:59 -0400, BLS windev...@hotmail.de wrote:
On 05/09/2010 02:16, Jonathan M Davis wrote:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
On 09/07/2010 03:15 PM, Steven Schveighoffer wrote:
On Tue, 07 Sep 2010 08:56:15 -0400, Jacob Carlborg d...@me.com wrote:
On 2010-09-07 14:49, Steven Schveighoffer wrote:
On Sun, 05 Sep 2010 09:40:59 -0400, BLS windev...@hotmail.de wrote:
On 05/09/2010 02:16, Jonathan M Davis wrote:
void
On Tue, 07 Sep 2010 09:28:18 -0400, Pelle pelle.mans...@gmail.com wrote:
On 09/07/2010 03:15 PM, Steven Schveighoffer wrote:
On Tue, 07 Sep 2010 08:56:15 -0400, Jacob Carlborg d...@me.com wrote:
On 2010-09-07 14:49, Steven Schveighoffer wrote:
On Sun, 05 Sep 2010 09:40:59 -0400, BLS
On 09/07/2010 04:33 PM, Steven Schveighoffer wrote:
Yes, a valid return. Your function should be:
void foo(void delegate(const(C) f) const
It helps to understand that inout/const/immutable has NOTHING to do with
code generation, it only has to do with limiting what compiles. For this
reason,
On Tue, 07 Sep 2010 11:37:20 -0400, Pelle pelle.mans...@gmail.com wrote:
On 09/07/2010 04:33 PM, Steven Schveighoffer wrote:
Yes, a valid return. Your function should be:
void foo(void delegate(const(C) f) const
It helps to understand that inout/const/immutable has NOTHING to do with
code
On 2010-09-07 17:37, Pelle wrote:
On 09/07/2010 04:33 PM, Steven Schveighoffer wrote:
Yes, a valid return. Your function should be:
void foo(void delegate(const(C) f) const
It helps to understand that inout/const/immutable has NOTHING to do with
code generation, it only has to do with
On 05/09/2010 02:16, Jonathan M Davis wrote:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
I am curious, how this will look and feel once inout is working ?
inout void foo(T)(inout(T)[] collection, inout T elem)
{
// Blah, whatever}
}
In D1 I did this sort of thing a fair amount:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
Worked for any of the string types, worked for any array, or anything with
the appropriate opIndexes, and for all I know there may be some improvement
that could still be made. But of
Nick Sabalausky a...@a.a wrote in message
news:i5su5e$23m...@digitalmars.com...
In D1 I did this sort of thing a fair amount:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
Worked for any of the string types, worked for any array, or anything with
the appropriate
On 2010-09-04 10:02, Nick Sabalausky wrote:
Nick Sabalauskya...@a.a wrote in message
news:i5su5e$23m...@digitalmars.com...
In D1 I did this sort of thing a fair amount:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
Worked for any of the string types, worked for any array, or
On Saturday 04 September 2010 00:57:48 Nick Sabalausky wrote:
In D1 I did this sort of thing a fair amount:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
Worked for any of the string types, worked for any array, or anything with
the appropriate opIndexes, and for all I
16 matches
Mail list logo