Boost C++ Libraries: Ticket #5112: [config][intel] Patch to detect C++0x features under Intel C++ compiler https://svn.boost.org/trac10/ticket/5112 <p> The attached patch attempts to add correct detection of C++0x features when enabled with -std=c++0x. I tested this against libs/config/tests/* using ICC 11.0.084, 11.1.073, and 12.0.0 under Linux; I also verified that ICC's static_assert (ICC 11 &amp; 12), rvalue reference (ICC 12), and decltype (ICC 12 only) support appear to work reliably in my own applications. </p> <p> Since I have neither a Windows machine nor a Windows license for ICC I wrote the BOOST_INTEL_WIN case based solely on the description at <a class="ext-link" href="http://software.intel.com/en-us/forums/showthread.php?t=64287"><span class="icon">​</span>http://software.intel.com/en-us/forums/showthread.php?t=64287</a> ; can anyone verify that this does indeed work for ICC 11 and/or 12 under Windows? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5112 Trac 1.4.3 spillner@… Mon, 24 Jan 2011 00:39:32 GMT attachment set https://svn.boost.org/trac10/ticket/5112 https://svn.boost.org/trac10/ticket/5112 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">intel-c++0x-v1.patch</span> </li> </ul> <p> Patches boost/config/compiler/intel.hpp to detect C++0x features when the -std=c++0x switch is passed to icpc </p> Ticket anonymous Mon, 24 Jan 2011 18:04:33 GMT <link>https://svn.boost.org/trac10/ticket/5112#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5112#comment:1</guid> <description> <p> This seems to work OK on Linux - I'm a little wary of using <span class="underline">STDC_HOSTED</span> for this as conceptually it could/should be set for C99 conforming mode as well (but appears not to be). </p> <p> On Win32, I'm a little concerned because their are other ways of disabling MSVC extensions besides -std=c++0x. Traditionally the Intel and MSVC compilers haven't really been usable without MSVC extensions anyway... although I don't know if this is still the case. </p> <p> For now just applying the Linux patches... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 24 Jan 2011 18:28:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5112#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5112#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/68420" title="Add preliminary C++0x support. Refs #5112.">[68420]</a>) Add preliminary C++0x support. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5112" title="#5112: Patches: [config][intel] Patch to detect C++0x features under Intel C++ compiler (closed: fixed)">#5112</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 25 Jan 2011 18:06:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5112#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5112#comment:3</guid> <description> <p> I wonder did you test any of the other C++0x features? Intel 11.1 appears not to require: </p> <p> # undef BOOST_NO_LAMBDAS # undef BOOST_NO_DECLTYPE # undef BOOST_NO_AUTO_DECLARATIONS # undef BOOST_NO_AUTO_MULTIDECLARATIONS </p> <p> and Intel 12.0 appears not to need: </p> <p> # undef BOOST_NO_SCOPED_ENUMS # undef BOOST_NO_DELETED_FUNCTIONS # undef BOOST_NO_DEFAULTED_FUNCTIONS </p> <p> All in C++0x mode of course. </p> <p> Thanks, John. </p> </description> <category>Ticket</category> </item> <item> <author>spillner@…</author> <pubDate>Wed, 26 Jan 2011 10:16:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5112#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5112#comment:4</guid> <description> <p> I know that there's some decltype support in 11.1, but I received number of compilation warnings (specifically on things like </p> <p> template &lt; class T &gt; struct Z { </p> <blockquote> <p> T dummy; typedef decltype(dummy.get()) retval; </p> </blockquote> <p> }; </p> <p> ) that went away when shifting to ICC 12 or GCC, so I enabled that only in 12 and up. This seems consistent with <a class="ext-link" href="http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/"><span class="icon">​</span>http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/</a> , which is more conservative than e.g. <a class="ext-link" href="http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport"><span class="icon">​</span>http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport</a> . </p> <p> I didn't have a mature use case for the other features, so I confined my attention to the three in the patch. They're also all supported by GCC, which gave me greater confidence in testing. Bottom line, I don't have any reason to believe that the features you named don't work well, I just haven't proven that they do. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 27 Jan 2011 11:47:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5112#comment:5 https://svn.boost.org/trac10/ticket/5112#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/68472" title="Fix up Intel C++0x features. Fixes #5112.">[68472]</a>) Fix up Intel C++0x features. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5112" title="#5112: Patches: [config][intel] Patch to detect C++0x features under Intel C++ compiler (closed: fixed)">#5112</a>. </p> Ticket