On Tue, 08 Jun 2010 03:29:05 +0200, Simen kjaeraas wrote:
> Sounds stupid, don't it?
> 123456789012345678901234567890123456789012345678901234567890123456789012
> Carrying in my hat my trusty foo, a std.typecons.Tuple!(float), I want
> to use it as a parameter to a function taking non-tuple paramet
On 06/07/2010 10:02 PM, Graham Fawcett wrote:
Hi folks,
This program works as expected in D2:
import std.stdio;
import std.algorithm;
T largestSubelement(T)(T[][] lol) {
alias reduce!"a>b?a:b" max;
return cast(T) max(map!max(lol)); // the cast matters...
}
On Mon, 07 Jun 2010 23:02:48 -0400, Graham Fawcett
wrote:
Hi folks,
This program works as expected in D2:
import std.stdio;
import std.algorithm;
T largestSubelement(T)(T[][] lol) {
alias reduce!"a>b?a:b" max;
return cast(T) max(map!max(lol)); // the cast matters.
Hi folks,
This program works as expected in D2:
import std.stdio;
import std.algorithm;
T largestSubelement(T)(T[][] lol) {
alias reduce!"a>b?a:b" max;
return cast(T) max(map!max(lol)); // the cast matters...
}
void main() {
auto a = [[1,2,3],[4,5,6],[8,9
Simen kjaeraas wrote:
I guess what I'm asking for here is, is there a way to do what I want?
Hm, it seems the problem was not where I thought it was. However, this
is getting curiouser and curiouser.
--
Simen
Sounds stupid, don't it?
123456789012345678901234567890123456789012345678901234567890123456789012
Carrying in my hat my trusty foo, a std.typecons.Tuple!(float), I want
to use it as a parameter to a function taking non-tuple parameters, i.e.
a single float. foo.tupleof gives me an unwieldy conglom
Simen kjaeraas wrote:
Another few that showed up now with my work on combinatorial products of
ranges:
/**
Determines whether a template parameter is a type of value (alias).
Example:
template foo( T... ) if (allSatisfy!( isAlias, T ) {...}
*/
template isAlias( alias T ) {
en
Simen kjaeraas wrote:
dennis luehring wrote:
D still won't accept an delegat in an extern C because this type does
not exists in the C world
Nor do classes, and those certainly can be passed to a C-linkage
function.
Yes, but I think that's a bug too. Quite a horrible one, in fact, since
t