Community
cancel
Showing results for 
Search instead for 
Did you mean: 
trekker99
Beginner
171 Views

Clarification of article on default compiler setting in VS2010 and XE

According to this article (http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/), C++0x support is on by default when using Intel C++ compiler with Visual Studio 2010 in Windows environment. May I know how I can tell if that is the case? After I created a new project and converted it to Intel C++, I took a look at the property page of the project. Under C/C++, Language [Intel C++], the value for "Enable C++0x support" is No.

Additionally, if I try to compile Boost 146.1 using the command line, I have to define /Qstd=c++0x in order to compile all the libraries which are not header-only.

Thanks.

*Edit* Link is now clickable.
0 Kudos
9 Replies
JenniferJ
Moderator
171 Views

"Enable C++0x support" in the VS2010 project property: it's from the .vcxproj. But when you compile with IntelC (icl), the /Qstd=c++0x is on by default, no need to pass it explicitely.

From cmd line, make sure the "cl.exe" is on the path. "icl" will look for the "cl.exe" on the "path" and set the correct default.
If the "cl.exe" is not on the path, use /Qvc10 for VS2010 compatibility mode.

Jennifer
trekker99
Beginner
171 Views

Thanks for the reply. I am able to access cl.exe from the command line but I still need to specify /Qstd=c++0x to Boost.Build before it works. /Qvc10 doesn't seem to work. I am going to try to create a simple test case as it could be some strange issue with Boost.Build causing the problem. Will post again once I get some results from this test.
trekker99
Beginner
171 Views

After some testing, I have discovered that the issue lies with VS2010's support for strongly typed enums. According to http://blogs.msdn.com/b/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx, there is partial support for this feature, but they do not support the syntax "enum class Color {red, blue};". Intel C++ supports this if /Qstd=c++0x is explicitly defined, otherwise it will not (thumbs up for consistency). I took a look at how Boost is determining C++0x support for Intel C++ (Windows) and they do not differentiate between what VS2010 and Intel Compiler supports. This means they will assume Intel C++ can support "enum class" syntax even though it doesn't without /Qstd=c++ being passed to it.

I would like to check if my conclusions are correct and whether Intel provides information highlighting the difference in C++0x features in VS2010 and Intel C++.

*EDIT* link is now clickable
trekker99
Beginner
171 Views

Anyone with any insight on my questions on strongly typed enums and C++0x feature differences between VS2010 and XE? I recently found out that nullptr support is another difference.

Thanks.
Judith_W_Intel
Employee
171 Views


The Intel compiler by default will try to support everything that the MS compiler supports by default. So if you are in the MSVC++ 2010 environment and are using our 12.0 compilerwe support lambdas, decltype, auto, static_assert, etc. just like MSVC++ 2010 without any special switches.If you use the /Qstd=c++0x option you will get additional C++0x features like strongly typed enums that only the Intel currently supports. For a complete list look at the Using Guideat ourdocumentation on this switch.

The only two missing C++0x features that we areaware of thatMSVC++ 2010 has that our 12.0 compiler does not are nullptr and late specified return types. These will be in our next release.
trekker99
Beginner
171 Views

Thanks for the answer. Do you have any idea when the next release with these features will be out?
Judith_W_Intel
Employee
171 Views


I do but I'm not sure if I'm allowed to give an answer.

Can someone on the support team please answer this?

Judy
Om_S_Intel
Employee
171 Views

Judy is right. We are not supposed to talk about the release of any future product.

Om Sachan
Intel compiler support
trekker99
Beginner
171 Views

Thanks for your time. We will make do for now.
Reply