Precise details about C++11 support

Precise details about C++11 support

I'm using ICC 13.x, and I'm writing C++11 code.

This document

http://software.intel.com/en-us/articles/c0x-features-supported-by-intel... 

tries to describe which C++11 features are supported.  But some of the boxes list "Partial" support.  Does anyone know where I can get more details on the level of support for those features?

For example, consider initializer lists.  This statement compiles fine on GCC 4.7.2:

   vector<int> x = {1,2,3};

However, icc 13.1 issues a compiler error.  The document mentioned above does list "General initializer lists" as having "Partial" support.  But if I'm trying to compile code like the example above and I get a compiler error, I don't know whether the problem lies with (a) my code, or (b) icc's known lack of support for that feature, or (c) a problem the version of libstdc++ I have on my system, or if (d) this is a previously unknown bug with icc which I should report.  If I knew the details of what "Partial" support for "General initializer lists" meant, I could avoid / sort-out issues like this faster.

9 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

What is going on with posts after the Submit button pressed?

I agree with your point of view and understand than Partial term doesn't bring clarity. I think the best thing that could be done, on the web page that describes which C++11 features are supported, is to add another column with a web-link to a C++11 test case. In that case a C++ developer could easily see and verify it. If support for some C++11 feature is changed then the C++11 test case needs to be updated.

I'll do a verification for your small test with the latest update for Intel C++ compiler ( Update 2 / Windows platform ) in order to answer your questions a), b), c), or d).

>>I'll do a verification for your small test with the latest update for Intel C++ compiler ( Update 2 / Windows platform ) in
>>order to answer your questions a), b), c), or d)...

It is possibly b).

...
vector< int > x = { 1, 2, 3 };
...

[ Intel C++ compiler 12.1.7.371 Build 20120928 / Windows XP ]

..>icl.exe /MD /Qstd=c++0x Main.cpp
Intel(R) C++ Compiler XE for applications running on IA-32, Version 12.1.7.371 Build 20120928
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.

Main.cpp
Main.cpp(17): error: initialization with "{...}" is not allowed for object of type "
std::vector>"
vector< int > x = { 1, 2, 3};
^
compilation aborted for Main.cpp (code 2)

[ Intel C++ compiler 13.1.0.149 Build 20130118 / Windows 7 ]

..>icl.exe /MD /Qstd=c++0x Main.cpp
Intel(R) C++ Compiler XE for applications running on IA-32, Version 13.1.0.149 Build 20130118
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.

Main.cpp
Main.cpp(17): error: no instance of constructor "std::vector<_Ty, _Ax>::vector [wit
h _Ty=int, _Ax=std::allocator]" matches the argument list
argument types are: (int, int, int)
vector< int > x = { 1, 2, 3};
^
compilation aborted for Main.cpp (code 2)

 

For c++11 initializer lists the support that is still missing are conversions to std::initializer_list. These will be fully implemented in the upcoming release.

Thanks Judith.  For that compatibility matrix listed at the top of this thread, it would be very helpful for Intel to post more-detailed information.  Specifically:

  • On the "Partial" support levels, what exactly does that mean?
  • For the features which are dependent on the system-installed version of the C++ standard library, what level of the standard C++ library is needed in order for ICC 13.x to support that feature.  For a possibly false example, ICC 13 + (GCC 4.7 or higher's libstdc++.so) is needed for std::chrono support.

The main point is that it needs to not become a major research project for us professional ICC users to determine whether or not we can use a given C++11 feature, given our requirements about the target systems.

It should be as simple as, "Okay, I'm targetting RHEL 6.4 or newer, and I've got ICC 13.  EXACTLY which C++11 features can I use?"

 

For the first question, "partial" in reality means we did enough to successfully compile the GNU headers. So for something like constexpr it's really hard to describe what doesn't work. I could give you some examples but I'm sure it wouldn't be a complete list. I think in the future we will just document these features as unsupported. I would say for now don't use any features listed as partial.

Regarding the second question, this is a library question. We don't produce our own libraries, we just use whatever GNU library is on the system. So you should consult the GNU library documentation for answers (or ask them to document their library support).

Judy

@Judith: Fair enough. Thanks.

>>...I think the best thing that could be done, on the web page that describes which C++11 features are supported, is to add
>>another column with a web-link to a C++11 test case. In that case a C++ developer could easily see and verify it. If support
>>for some C++11 feature is changed then the C++11 test case needs to be updated...

Judith, Please consider it as a feature request for online documentation related to C++11 features.

Faça login para deixar um comentário.