Re: map on fixed-size arrays

2010-08-21 Thread Andrei Alexandrescu
On 8/21/10 5:37 CDT, Eduardo Cavazos wrote: Hello, The 'map' from std.algorithm doesn't seem to work with fixed-size arrays: -- import std.stdio ; import std.math ; import std.algorithm ; T sq ( T ) ( T x ) { return x*x ; } v

Re: map on fixed-size arrays

2010-08-21 Thread Pelle
On 08/21/2010 12:37 PM, Eduardo Cavazos wrote: Hello, The 'map' from std.algorithm doesn't seem to work with fixed-size arrays: -- import std.stdio ; import std.math ; import std.algorithm ; T sq ( T ) ( T x ) { return x*x ; }

Re: map on fixed-size arrays

2010-08-21 Thread Dmitry Olshansky
On 21.08.2010 14:37, Eduardo Cavazos wrote: Hello, The 'map' from std.algorithm doesn't seem to work with fixed-size arrays: -- import std.stdio ; import std.math ; import std.algorithm ; T sq ( T ) ( T x ) { return x*x ; } v

Re: map on fixed-size arrays

2010-08-21 Thread bearophile
Eduardo Cavazos: > The 'map' from std.algorithm doesn't seem to work with fixed-size arrays: See bug 4114 In my opinion map, sort, etc have to work with fixed-sized arrays too (otherwise I'll have to write more wrappers). Bye, bearophile

map on fixed-size arrays

2010-08-21 Thread Eduardo Cavazos
Hello, The 'map' from std.algorithm doesn't seem to work with fixed-size arrays: -- import std.stdio ; import std.math ; import std.algorithm ; T sq ( T ) ( T x ) { return x*x ; } void main () { double [2] a = [ 1.0 , 2.0 ]