Intel icpc unable to compiler <future> of gcc 4.7

Intel icpc unable to compiler of gcc 4.7

Here is a minimal example, the problem seems to be related to lambda.

#include <future>

void say () { /* do nothing */ }

int main ()
{
auto handle = std::async(say);
handle.get();

return 0;
}

Here is the error message, I delete the "instantiation of ..." etc. messages 

/usr/include/c++/4.7/future(1453): error: invalid designator kind
_M_thread = std::thread{ [this] {
^

/usr/include/c++/4.7/future(1453): error: expression must have a constant value
_M_thread = std::thread{ [this] {
^
/usr/include/c++/4.7/future(1454): error: expected a "}"
_M_set_result(_S_task_setter(_M_result, _M_fn));
^
/usr/include/c++/4.7/future(1453): error: function "std::thread::operator=(const std::thread &)" (declared at line 144 of "/usr/include/c++/4.7/thread") cannot be referenced -- it is a deleted function
_M_thread = std::thread{ [this] {
^
/usr/include/c++/4.7/future(524): error: type name is not allowed
return _Setter{ __ptr, std::ref(__call) };
^

/usr/include/c++/4.7/bits/alloc_traits.h(56): error: expression must have a constant value
static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);
^
/usr/include/c++/4.7/bits/alloc_traits.h(201): error: incomplete type is not allowed
using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
^
/usr/include/c++/4.7/bits/alloc_traits.h(89): error: name followed by "::" must be a class or namespace name
typedef typename _Alloc::value_type value_type;

6 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi woodwind,

I can reproduce this too.  I've reported it to our front end team, and I'll let you know when more progress in the investigatino is made.  Thanks.

Brandon Hewitt Technical Consulting Engineer For 1:1 technical support: http://premier.intel.com Software Product Support info: http://www.intel.com/software/support

Hello,

are there any updates? I'm getting the same error with the icpc version 13.1.1.

Same question, any update for this?

This doesn't compile with gcc 4.8.1 either, while it compiles fine with g++.

An update.  icc 14.0 supports gcc 4.7 & 4.8 now.

Feilong

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi