Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrey_K_
Beginner
169 Views

braced-init-list in ranged for loop is not supported (C++11)?

Jump to solution

Hi, according C++11 specification (in my case I refer to draft n3376) the following 'for' construction is valid:

#include <iostream>
int main(void) {
    for (auto x : { 0, 1, 2 }){
        std::cout << x;
    }
}

But trying to compile it with intel c++ compiler gives me error:

main.cpp(3): error : assertion failed at: "shared/cfe/edgcpfe/il.c", line 15066

I have installed the following compiler: Intel® C++ Composer XE 2013 SP1 Update 2 Integration for Microsoft* Visual Studio* 2013, Version 14.0.1290.12

0 Kudos
1 Solution
Hubert_H_Intel
Employee
169 Views

Andrey,

With the Intel® Composer XE 2015 Beta we have full C++11 support now. Would you like to try it out?

http://software.intel.com/en-us/articles/intel-software-development-tools-2015-beta

On Linux we have support for initializer lists with g++ 4.4. So - as Franz mentions - the Intel Composer XE 2013 SP1 compiles on openSUSE 13.2 which is g++ 4.8 based.

By the way: Which is your serial number of the Intel C++ Composer XE v14.0? You can answer via "Send Author A Message". Thanks!

Regards, Hubert.

View solution in original post

5 Replies
bernaske
New Contributor I
169 Views

Hi Andrey,

 

i have Your sample compile under openSUSE 13.2 Linux no probems on compile and execute see output:

linux-cuda60:/system_programming/projects # icpc -m64 -std=c++11 testicc.c                                                                     
linux-cuda60:/system_programming/projects # icpc -m64 -std=c++11 testicc.c -o test1                                                            
linux-cuda60:/system_programming/projects # ./test1                                                                                            
012linux-cuda60:/system_programming/projects #   

icpc (ICC) 14.0.2 20140120                                                                                                                     
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.         this is my compiler version

regards

Franz

 

                                                                    

                                                                                             

Hubert_H_Intel
Employee
170 Views

Andrey,

With the Intel® Composer XE 2015 Beta we have full C++11 support now. Would you like to try it out?

http://software.intel.com/en-us/articles/intel-software-development-tools-2015-beta

On Linux we have support for initializer lists with g++ 4.4. So - as Franz mentions - the Intel Composer XE 2013 SP1 compiles on openSUSE 13.2 which is g++ 4.8 based.

By the way: Which is your serial number of the Intel C++ Composer XE v14.0? You can answer via "Send Author A Message". Thanks!

Regards, Hubert.

View solution in original post

Andrey_K_
Beginner
169 Views

If I understand the right way, the Intel Composer XE 2013 SP1 for windows should be based on MSVC, but MSVC12 also support initializer_list, and can compile the example above

Hubert_H_Intel
Employee
169 Views

Andrey,

Yes, the MSVC12 compiles the code. The Intel compiler is based on MSVC since we do not have our own standard libraries and a linker.

Does this answer your question?

Hubert.

Andrey_K_
Beginner
169 Views

Yes, with the Intel® Composer XE 2015 Beta it works fine, thank you.

Reply