Problems with lambda implementation

2009-09-10 Thread Sergey Sadovnikov
Hello, Recently I made some tests with lambda (mingw build) I found some problems. Here they are: 1. Lambda and template type deduction. Try this sample: #include #include #include #include typedef std::function FnType; template FnType average_damp(T fn) { return [fn](double x) {retur

Is this code legal?

2009-10-05 Thread Sergey Sadovnikov
Hello all. I try to compile the following code sample: (with MinGW gcc version 4.5.0 20090819 (experimental) (GCC)) #include #include #include template struct Message { std::array m_Message; Message() : m_Message{Chars...} // {*1} { std::array msg

Re[2]: Is this code legal?

2009-10-06 Thread Sergey Sadovnikov
Hello, Paolo. Tuesday, October 6, 2009 at 2:05:10 PM you wrote: PB> On 10/05/2009 09:29 PM, Sergey Sadovnikov wrote: >> Can anybody explain why line marked with '{*1}' produce this error >> message: PB> I think it's because there is no constructor for array th

Linkage problem with rescent gcc 4.5 in MinGW build

2009-10-10 Thread Sergey Sadovnikov
Hello. There is linkage problem with recent gcc 4.5 in MinGW configuration build. Executables which are produced by gcc with default options set treated as 'not a valid win32 application' by the system (Win2008 x64 server). After stripping with the 'strip' utility executables are successfully ran.