Boost C++ Libraries: Ticket #1563: MS releases TR1 support Beta https://svn.boost.org/trac10/ticket/1563 <p> Microsoft has released a feature pack for VS2008 that also includes an implementation of TR1, including features such as: </p> <p> Smart pointers </p> <p> Regular expression parsing </p> <p> New containers (tuple, array, unordered set, etc) </p> <p> Sophisticated random number generators </p> <p> Polymorphic function wrappers </p> <p> Type traits </p> <p> (see <a class="ext-link" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0d805d4e-2dc2-47c7-8818-a9f59de4cd9b&amp;DisplayLang=en"><span class="icon">​</span>http://www.microsoft.com/downloads/details.aspx?FamilyID=0d805d4e-2dc2-47c7-8818-a9f59de4cd9b&amp;DisplayLang=en</a>) </p> <p> Can we put in the hooks necessary to recognise and use this pack, instead of the boost one, while running the boost tests? Indeed it would be good to be able to benchmark one tr1 implemantation against the other! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1563 Trac 1.4.3 John Maddock Wed, 09 Jan 2008 17:20:40 GMT status changed; cc set https://svn.boost.org/trac10/ticket/1563#comment:1 https://svn.boost.org/trac10/ticket/1563#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">jrp@…</span> added </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I'll look into this, in the mean time, if you can see any means of detecting when VC9 TR1 update has been installed, that would be a big help, John. </p> Ticket John Maddock Wed, 09 Jan 2008 17:36:53 GMT <link>https://svn.boost.org/trac10/ticket/1563#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1563#comment:2</guid> <description> <p> Looking at this further, it appears that the version of VC9 I have doesn't support this beta, so I can't install it :-( </p> <p> The documentation mentions the define _HAS_TR1, can you check to see if this gets defined to a non zero value after including &lt;utility&gt; or not? </p> <p> Many thanks, John. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Wed, 09 Jan 2008 22:47:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1563#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1563#comment:3</guid> <description> <p> THeres a </p> <pre class="wiki"> #if !defined(_HAS_TR1) #define _HAS_TR1 1 /* enable TR1 extensions */ #endif /* !defined(_HAS_TR1) */ </pre><p> in yvals.h, which is included as a result of including &lt;utility&gt; (amongst other things). </p> <p> I tried changing the VC bit of tr1\detail\config.hpp to </p> <pre class="wiki">#if _HAS_TR1 # define BOOST_HAS_TR1_ARRAY # define BOOST_HAS_TR1_REFERENCE_WRAPPER # define BOOST_HAS_TR1_RESULT_OF # define BOOST_HAS_TR1_MEM_FN # define BOOST_HAS_TR1_BIND # define BOOST_HAS_TR1_FUNCTION # define BOOST_HAS_TR1_HASH # define BOOST_HAS_TR1_SHARED_PTR # define BOOST_HAS_TR1_RANDOM # define BOOST_HAS_TR1_REGEX # define BOOST_HAS_TR1_TUPLE # define BOOST_HAS_TR1_TYPE_TRAITS # define BOOST_HAS_TR1_UTILITY # define BOOST_HAS_TR1_UNORDERED_MAP # define BOOST_HAS_TR1_UNORDERED_SET #else # define BOOST_HAS_TR1_HASH #endif </pre><p> And successfully called the MS versions of bind and shared_ptr (with the same code on VC8 still calling the Boost versions.) I havent tried any other libs yet. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 10 Jan 2008 12:03:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1563#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1563#comment:4</guid> <description> <p> Can you try building the TR1 tests with this change? </p> <p> And compare the results to the effect with _HAS_TR1=0 defined? </p> <p> Thanks! </p> <p> John. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <Richard.Webb@…></author> <pubDate>Thu, 10 Jan 2008 12:56:38 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/1563 https://svn.boost.org/trac10/ticket/1563 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">tr1.zip</span> </li> </ul> <p> TR1 test results </p> Ticket Richard Webb <Richard.Webb@…> Thu, 10 Jan 2008 12:57:28 GMT attachment set https://svn.boost.org/trac10/ticket/1563 https://svn.boost.org/trac10/ticket/1563 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">notr1.zip</span> </li> </ul> <p> TR1 test results with _HAS_TR1=0 </p> Ticket Richard Webb <Richard.Webb@…> Thu, 10 Jan 2008 13:09:42 GMT <link>https://svn.boost.org/trac10/ticket/1563#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1563#comment:5</guid> <description> <p> Running the tests with _HAS_TR1=1 results in a lot of test failures, with some seemingly down to missing typedefs in the MS libs. e.g. </p> <pre class="wiki">test_bind.cpp(33) : error C2039: 'result_type' : is not a member of 'std::tr1::_Bind&lt;_Ret,_BindN&gt;' E:\BoostSVN\boost/regex/concepts.hpp(560) : error C2039: 'size_type' : is not a member of 'std::tr1::basic_regex&lt;_Elem&gt;' test_hash.cpp(22) : error C2039: 'argument_type' : is not a member of 'std::tr1::hash&lt;std::string&gt;' </pre><p> The docs that ship with the beta say that bind has some problems, but i don't know about the others. </p> <p> Adding a &lt;define&gt;_HAS_TR1=0 to the test jamfile and then re-running the test gives the same results you get now without the beta (the MS version of hash gets included regardless of _HAS_TR1, so that still fails). </p> <p> Building the current Trunk code with the beta results in loads of 'multiple declaration' errors, and my change removes all those. </p> <p> See attached logs for more info </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 14 Jan 2008 16:22:35 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1563#comment:6 https://svn.boost.org/trac10/ticket/1563#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I've just committed your suggested patch: on the basis that VC9 + the feature pack will be unusable without it! </p> <p> However, if there are any regressions in the release branch it'll just get yanked out I'm afraid :-( </p> <p> Regards, John. </p> Ticket