<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Q&amp;amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx</link><description>Hello. My name is Stephan and I’m a developer on the Visual C++ libraries team. As the Visual Studio 2008 Feature Pack Beta (available for download here with documentation available here ) contains an implementation of TR1, I thought I’d answer some common</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>???????????????????? ?????????????????? - ????????????????????</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7034553</link><pubDate>Wed, 09 Jan 2008 04:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7034553</guid><dc:creator>???????????????????? ?????????????????? - ????????????????????</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.gotdotnet.ru/personal/kichik/PermaLink,guid,4F4F8997-BB1C-41BD-9E39-F901F7F75C54.aspx"&gt;http://blogs.gotdotnet.ru/personal/kichik/PermaLink,guid,4F4F8997-BB1C-41BD-9E39-F901F7F75C54.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7034781</link><pubDate>Wed, 09 Jan 2008 04:38:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7034781</guid><dc:creator>Neil</dc:creator><description>&lt;p&gt;Great stuff! &amp;nbsp;Thanks for the detailed rundown. &amp;nbsp;Looking forward to using it!&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7035986</link><pubDate>Wed, 09 Jan 2008 06:58:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7035986</guid><dc:creator>Cory Nelson</dc:creator><description>&lt;p&gt;Looks nice, but where do we submit TR1 bugs?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7036247</link><pubDate>Wed, 09 Jan 2008 07:25:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7036247</guid><dc:creator>James</dc:creator><description>&lt;p&gt;If TR1 is just a bunch of headers and maybe some link libraries, and if there are no compiler changes, then why would TR1 not run on VCExpress? With a little bit of manual work, I imagine that it would not be too difficult to get up and running. Is this merely a business decision, or is there actually a technical reason for this restriction?&lt;/p&gt;
&lt;p&gt;Why you may ask?&lt;/p&gt;
&lt;p&gt;I have access to the full version, but I honestly prefer to work in Express. Express removes so much of the unneeded bloat, is faster, and as a result more productive. Similar to the days of VC6.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7039592</link><pubDate>Wed, 09 Jan 2008 14:14:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7039592</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Cory Nelson]&lt;/p&gt;
&lt;p&gt;&amp;gt; Looks nice, but where do we submit TR1 bugs?&lt;/p&gt;
&lt;p&gt;Microsoft Connect, or directly to me at stl@microsoft.com .&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej&lt;/p&gt;
&lt;p&gt;Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7039775</link><pubDate>Wed, 09 Jan 2008 14:59:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7039775</guid><dc:creator>Anon.</dc:creator><description>&lt;p&gt;Stephan T. Lavavej,&lt;/p&gt;
&lt;p&gt;Pretty cool initials you have there. Seems ideal for someone who loves the STL so much.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7042498</link><pubDate>Wed, 09 Jan 2008 19:37:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7042498</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;James,&lt;/p&gt;
&lt;p&gt;Thats a really great idea: use VCExpress to avoid the bloated VS.&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej,&lt;/p&gt;
&lt;p&gt;Is there an official method for paying customers to use (leverage) VCExpress with MFC and TR1. I also find VS has become very bloated since VC6. &amp;nbsp;Overall, I think the VC++ team is doing a good job, but much of Visual Studio does not appeal to me.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7044322</link><pubDate>Wed, 09 Jan 2008 22:01:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7044322</guid><dc:creator>Pavel Minaev</dc:creator><description>&lt;p&gt;Speaking of STL optimizations: is there any specific reason (aside from the &amp;quot;we haven't time to do that&amp;quot;) why std::vector doesn't use __is_pod and friends to switch to a memset/memcpy-using implementation where possible? In my tests, this gives noticeable speed increase for small elements - it's more than 2x for chars, and 20% for shorts.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7044667</link><pubDate>Wed, 09 Jan 2008 22:30:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7044667</guid><dc:creator>Kevin</dc:creator><description>&lt;p&gt;Dinkumware has implemented nearly everything in sections 5.2 and 8. &amp;nbsp;Since MS is licensing Dinkumware's implementation, is there a good reason VC9 TR1 does not include sections 5.2 and 8?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7044729</link><pubDate>Wed, 09 Jan 2008 22:35:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7044729</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Anon.]&lt;/p&gt;
&lt;p&gt;&amp;gt; Pretty cool initials you have there. Seems ideal for someone who loves the STL so much.&lt;/p&gt;
&lt;p&gt;Yes (and my initials are so much more convenient to type)!&lt;/p&gt;
&lt;p&gt;[Jared]&lt;/p&gt;
&lt;p&gt;&amp;gt; Is there an official method for paying customers to use (leverage) VCExpress with MFC and TR1.&lt;/p&gt;
&lt;p&gt;No, this is not supported.&lt;/p&gt;
&lt;p&gt;[Pavel Minaev]&lt;/p&gt;
&lt;p&gt;&amp;gt; Speaking of STL optimizations: is there any specific reason&lt;/p&gt;
&lt;p&gt;&amp;gt; (aside from the &amp;quot;we haven't time to do that&amp;quot;) why std::vector&lt;/p&gt;
&lt;p&gt;&amp;gt; doesn't use __is_pod and friends to switch to a&lt;/p&gt;
&lt;p&gt;&amp;gt; memset/memcpy-using implementation where possible?&lt;/p&gt;
&lt;p&gt;I thought it did - vector&amp;lt;T&amp;gt;::push_back() eventually calls vector&amp;lt;T&amp;gt;::_Insert_n(), which (should) call _Umove() to move elements from the old memory block to the new memory block. (As I mentioned in &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/vcblog/archive/2008/01/07/mfc-beta-now-available.aspx#7032589"&gt;http://blogs.msdn.com/vcblog/archive/2008/01/07/mfc-beta-now-available.aspx#7032589&lt;/a&gt; , this is broken in the VC9 TR1 Beta.) That eventually calls _Uninit_move(), which - if T is something like char which isn't annotated with _Swap_move_tag - calls unchecked_uninitialized_copy() (&amp;quot;move defaults to copy if there is not a more effecient way&amp;quot;). That eventually calls _Uninit_copy(), of which there are two implementations. The first is for _Nonscalar_ptr_iterator_tag, and the second is for _Scalar_ptr_iterator_tag. The latter calls _CRT_SECURE_MEMMOVE().&lt;/p&gt;
&lt;p&gt;Did you define __STDC_WANT_SECURE_LIB__ to 0 when doing your performance comparisons? If not, you might just be seeing the overhead of memmove_s() versus memmove().&lt;/p&gt;
&lt;p&gt;Of course, now I wonder if memcpy() is actually faster, and whether we should be using _CRT_SECURE_MEMCPY().&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej&lt;/p&gt;
&lt;p&gt;Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7045226</link><pubDate>Wed, 09 Jan 2008 23:25:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7045226</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Kevin]&lt;/p&gt;
&lt;p&gt;&amp;gt; Dinkumware has implemented nearly everything in&lt;/p&gt;
&lt;p&gt;&amp;gt; sections 5.2 and 8. &amp;nbsp;Since MS is licensing&lt;/p&gt;
&lt;p&gt;&amp;gt; Dinkumware's implementation, is there a good reason&lt;/p&gt;
&lt;p&gt;&amp;gt; VC9 TR1 does not include sections 5.2 and 8?&lt;/p&gt;
&lt;p&gt;Development time, testing time, and customer value.&lt;/p&gt;
&lt;p&gt;Shipping C99 compat and special math functions would take more dev and test time (probably not an incredible amount of time, but definitely nonzero).&lt;/p&gt;
&lt;p&gt;The special math functions are of extremely limited interest (and have not been picked up into C++0x), and the C99 compat, while useful, is of less interest than the Boost-derived components. (I'd like to have &amp;lt;cstdint&amp;gt;, but shared_ptr is about a bazillion times more vital.)&lt;/p&gt;
&lt;p&gt;So, given limited resources, we chose the Boost-derived components and unordered containers. Does that sound reasonable?&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej&lt;/p&gt;
&lt;p&gt;Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7051264</link><pubDate>Thu, 10 Jan 2008 10:05:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7051264</guid><dc:creator>Pavel Minaev</dc:creator><description>&lt;p&gt;&amp;gt; Of course, now I wonder if memcpy() is actually faster, and whether we should be using _CRT_SECURE_MEMCPY().&lt;/p&gt;
&lt;p&gt;Not really, since memmove() in VC checks the ranges for overlap, and delegates to memcpy() if possible anyway. My tests show no noticeable difference for non-overlapping sequences between the two even for amount of data as small as 4K. Not a problem with memmove_s(), either - it also does a very quick check with no observable difference for moderately large vectors.&lt;/p&gt;
&lt;p&gt;I was also thinking that the difference is because I used memset to zero-initialize my arrays, and vector uses std::fill (it could also use memset to default-initialize PODs, by the way), but again it doesn't seem to make any difference. So I don't know what to make of it. Here's the code I've used to test:&lt;/p&gt;
&lt;p&gt;#include &amp;lt;algorithm&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;cstdio&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;cstring&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;vector&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;windows.h&amp;gt;&lt;/p&gt;
&lt;p&gt;struct timer&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;const char* msg;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;DWORD start;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;timer(const char* msg)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;: msg(msg), start(GetTickCount())&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;~timer()&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;DWORD end = GetTickCount();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;std::fprintf(stderr, &amp;quot;%s: %u\n&amp;quot;, msg, end - start);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
&lt;p&gt;int main()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;typedef char elem_t;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;static const int N = 100000, K = 10000;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;//getchar();&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;timer t(&amp;quot;vector&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;for (int k = 0; k &amp;lt; K; ++k)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::vector&amp;lt;elem_t&amp;gt; v(N);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;v.push_back(0);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;timer t(&amp;quot;fill + memmove&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;for (int k = 0; k &amp;lt; K; ++k)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;elem_t* a1 = new elem_t[N];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::fill(a1, a1 + N, 0);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;elem_t* a2 = new elem_t[N * 2];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::memmove(a2, a1, N * sizeof(elem_t));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;delete[] a1;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;a2[N] = 0;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;delete[] a2;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;timer t(&amp;quot;fill + memcpy&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;for (int k = 0; k &amp;lt; K; ++k)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;elem_t* a1 = new elem_t[N];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::fill(a1, a1 + N, 0);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;elem_t* a2 = new elem_t[N * 2];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::memcpy(a2, a1, N * sizeof(elem_t));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;delete[] a1;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;a2[N] = 0;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;delete[] a2;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;timer t(&amp;quot;memset + memcpy&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;for (int k = 0; k &amp;lt; K; ++k)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;elem_t* a1 = new elem_t[N];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::memset(a1, 0, N * sizeof(elem_t));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;elem_t* a2 = new elem_t[N * 2];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::memcpy(a2, a1, N * sizeof(elem_t));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;delete[] a1;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;a2[N] = 0;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;delete[] a2;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;This is compiled with:&lt;/p&gt;
&lt;p&gt;&amp;gt; cl /EHsc /Ox /Zi /D_SECURE_SCL=0 /D__STDC_WANT_SECURE_LIB__=0&lt;/p&gt;
&lt;p&gt;When run, it gives the following results:&lt;/p&gt;
&lt;p&gt;vector: 1344&lt;/p&gt;
&lt;p&gt;fill + memmove: 422&lt;/p&gt;
&lt;p&gt;fill + memcpy: 422&lt;/p&gt;
&lt;p&gt;memset + memcpy: 437&lt;/p&gt;
&lt;p&gt;From what you say, I would expect vector to be as fast as fill+memmove (since that's pretty much what it does). Curiously, these numbers differ with varying K and N; in general, smaller N make the difference more pronounced, while larger N make it less noticeable. For example, for N=10000 &amp;amp; K=1000000 I get:&lt;/p&gt;
&lt;p&gt;vector: 11391&lt;/p&gt;
&lt;p&gt;fill + memmove: 2343&lt;/p&gt;
&lt;p&gt;fill + memcpy: 2313&lt;/p&gt;
&lt;p&gt;memset + memcpy: 2328&lt;/p&gt;
&lt;p&gt;And for N=1000000 &amp;amp; K=1000, it's:&lt;/p&gt;
&lt;p&gt;vector: 5000&lt;/p&gt;
&lt;p&gt;fill + memmove: 4938&lt;/p&gt;
&lt;p&gt;fill + memcpy: 4937&lt;/p&gt;
&lt;p&gt;memset + memcpy: 4938&lt;/p&gt;
&lt;p&gt;Which makes more sense. I'm more interested in cases with N&amp;lt;100000, since that's where it is going to be in most practical cases. From these numbers, it seems that the issue is not in the filling/copying code itself, but in some checks which remain there even with _SECURE_SCL disabled. &lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7051312</link><pubDate>Thu, 10 Jan 2008 10:08:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7051312</guid><dc:creator>Pavel Minaev</dc:creator><description>&lt;p&gt;&amp;gt; I'd like to have &amp;lt;cstdint&amp;gt;, but shared_ptr is about a bazillion times more vital.&lt;/p&gt;
&lt;p&gt;&amp;lt;cstdint&amp;gt; is by far the most important of all TR1 compat headers, and also the simplest; why not have it and forgo the rest?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7052155</link><pubDate>Thu, 10 Jan 2008 11:13:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7052155</guid><dc:creator>Phaeron</dc:creator><description>&lt;p&gt;I'm disappointed at stdint/cstdint being missing, too. I hate typing unsigned __int64 in one-off programs and I've never seen a major project that didn't have to have its own typedefs for sized types. Lots of fun when they collide. Much of the stuff in TR1 section 8 I could do without, but stdint.h I want. I suppose not having the extra printf() size specifiers would be a bummer, though.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7053131</link><pubDate>Thu, 10 Jan 2008 12:43:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7053131</guid><dc:creator>Pavel Minaev</dc:creator><description>&lt;p&gt;Well, for most practical purposes, we've got a defacto standard by now:&lt;/p&gt;
&lt;p&gt;sizeof(short)==2&lt;/p&gt;
&lt;p&gt;sizeof(int)==4&lt;/p&gt;
&lt;p&gt;sizeof(long long)==8&lt;/p&gt;
&lt;p&gt;At least I'm not aware of any still-relevant compiler for which this doesn't hold (I know int was 2 bytes in 16-bit DOS days, but these are hardly relevant today).&lt;/p&gt;
&lt;p&gt;Even so, int32_t is so much more preferrable...&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7063113</link><pubDate>Fri, 11 Jan 2008 01:00:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7063113</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Pavel Minaev]&lt;/p&gt;
&lt;p&gt;Aha - it's good to know that memmove_s(), memmove(), and memcpy() are basically indistinguishable, and the same for fill() and memset().&lt;/p&gt;
&lt;p&gt;Thanks for the test case - profiling indicates that the vector test spends 76% of its time in vector&amp;lt;T&amp;gt;::_Construct_n(). I'll file a bug.&lt;/p&gt;
&lt;p&gt;&amp;gt; &amp;lt;cstdint&amp;gt; is by far the most important of all TR1 compat headers,&lt;/p&gt;
&lt;p&gt;&amp;gt; and also the simplest; why not have it and forgo the rest?&lt;/p&gt;
&lt;p&gt;The &amp;quot;which parts of TR1 should we ship&amp;quot; decision was made at the coarsest-grained level of Boost/C99/Math.&lt;/p&gt;
&lt;p&gt;[Phaeron]&lt;/p&gt;
&lt;p&gt;&amp;gt; I'm disappointed at stdint/cstdint being missing, too.&lt;/p&gt;
&lt;p&gt;There's always boost/cstdint.hpp.&lt;/p&gt;
&lt;p&gt;&amp;gt; I hate typing unsigned __int64 in one-off programs&lt;/p&gt;
&lt;p&gt;VC accepts &amp;quot;unsigned long long&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;gt; and I've never seen a major project that didn't have to have&lt;/p&gt;
&lt;p&gt;&amp;gt; its own typedefs for sized types. Lots of fun when they collide.&lt;/p&gt;
&lt;p&gt;Namespaces!&lt;/p&gt;
&lt;p&gt;Also - I'd like to personally thank you, Phaeron, for writing those two posts about autoexp.dat visualizers. They really helped me when I was writing the TR1 visualizers (which, as you will see, are extensively commented - unlike the existing STL visualizers).&lt;/p&gt;
&lt;p&gt;[Pavel Minaev]&lt;/p&gt;
&lt;p&gt;&amp;gt; At least I'm not aware of any still-relevant compiler for which this doesn't hold&lt;/p&gt;
&lt;p&gt;&amp;quot;ILP64&amp;quot; platforms make int, long, long long, and void * all 64 bits. I'm not sure which platforms actually implement ILP64.&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej&lt;/p&gt;
&lt;p&gt;Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7068244</link><pubDate>Fri, 11 Jan 2008 09:15:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7068244</guid><dc:creator>Phaeron</dc:creator><description>&lt;p&gt;&amp;gt; There's always boost/cstdint.hpp.&lt;/p&gt;
&lt;p&gt;I tend to compile lots of little test programs with cl.exe for which bringing in Boost is, um, a bit much.&lt;/p&gt;
&lt;p&gt;&amp;gt; VC accepts &amp;quot;unsigned long long&amp;quot;.&lt;/p&gt;
&lt;p&gt;That's even longer!&lt;/p&gt;
&lt;p&gt;&amp;gt; Also - I'd like to personally thank you, Phaeron, for writing those two posts about&lt;/p&gt;
&lt;p&gt;&amp;gt; autoexp.dat visualizers. They really helped me when I was writing the TR1 visualizers&lt;/p&gt;
&lt;p&gt;&amp;gt; (which, as you will see, are extensively commented - unlike the existing STL&lt;/p&gt;
&lt;p&gt;&amp;gt; visualizers).&lt;/p&gt;
&lt;p&gt;You're welcome. You can probably imagine my amusement, though, that a developer on the VC++ Libraries team used reverse-engineered docs from an external source for the VC++ debugger. Go bug the debugger team and ask them to write better docs! Then tell them to release them to us. :)&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7075532</link><pubDate>Fri, 11 Jan 2008 18:51:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7075532</guid><dc:creator>Pavel Minaev</dc:creator><description>&lt;p&gt;&amp;gt; I've written visualizers for almost every TR1 type (I am secretly proud of how shared_ptr's visualizer switches between &amp;quot;1 strong ref&amp;quot; and &amp;quot;2 strong refs&amp;quot;).&lt;/p&gt;
&lt;p&gt;How about boost::function? ;)&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7077768</link><pubDate>Fri, 11 Jan 2008 21:41:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7077768</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Phaeron]&lt;/p&gt;
&lt;p&gt;&amp;gt; I tend to compile lots of little test programs with cl.exe for which bringing in Boost is, um, a bit much.&lt;/p&gt;
&lt;p&gt;At home, I drop Boost into VC\PlatformSDK\Include and VC\PlatformSDK\Lib, so I can use it without any /I switches. &amp;nbsp;(I could also have used VC\include and VC\lib .) &amp;nbsp;This is, of course, entirely unsupported - as a general rule you shouldn't perform brain surgery in Program Files - but it works entirely well.&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; VC accepts &amp;quot;unsigned long long&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;gt; That's even longer!&lt;/p&gt;
&lt;p&gt;The typedefs I use at home are uc_t, us_t, ul_t, and ull_t. :-)&lt;/p&gt;
&lt;p&gt;&amp;gt; You're welcome. You can probably imagine my amusement, though,&lt;/p&gt;
&lt;p&gt;&amp;gt; that a developer on the VC++ Libraries team used reverse-engineered&lt;/p&gt;
&lt;p&gt;&amp;gt; docs from an external source for the VC++ debugger.&lt;/p&gt;
&lt;p&gt;The sad thing is that - to my knowledge - your docs are the most complete ones in existence. We don't have *any* internal docs for the visualizer, beyond the comments in autoexp.dat.&lt;/p&gt;
&lt;p&gt;[Pavel Minaev]&lt;/p&gt;
&lt;p&gt;&amp;gt; How about boost::function? ;)&lt;/p&gt;
&lt;p&gt;I visualize tr1::function too; however, pointers-to-bases are a &amp;quot;brick wall&amp;quot; to visualizers, so I can only preview them with &amp;quot;empty&amp;quot; or &amp;quot;full&amp;quot;. Vaguely speaking, _Impl-&amp;gt;_Callee._Object stores the functor, but there's no way to get that into the preview.&lt;/p&gt;
&lt;p&gt;For the same reason, shared_ptr deleters are not visualizable. When this happens, I provide [actual members] so you can dig into the representation; the foo,! trick isn't widely known, and is less convenient anyways.&lt;/p&gt;
&lt;p&gt;Yesterday, I checked in an enhanced regex visualizer. While basic_regex looks like it stores a plain string, it actually stores a finite state machine, which is completely un-visualizable. So, I added a data member named _Visualization to basic_regex that stores the string from which it was constructed, which we can use to preview the regex. By default, this is enabled in debug and disabled in ship (we'll fall back to a significantly less useful preview), although you can override this by defining _ENHANCED_REGEX_VISUALIZER (0 in debug would remove the overhead of storing the string; 1 in ship would make debugging easier). While basic_regex is much more heavyweight than a simple string, I didn't want to make ship any slower without people asking for it.&lt;/p&gt;
&lt;p&gt;Hopefully, you will be pleasantly surprised by the number of TR1 types that I visualize, and the comprehensiveness of their visualizers. weak_ptrs can be previewed with &amp;quot;expired&amp;quot;, regex_iterators and regex_token_iterators have useful previews and children, and even the return value of bind() will be visualized (this hasn't been checked in yet, pending a bind() fix, but STL functors like plus&amp;lt;T&amp;gt;() and the like will also get visualizers, since that makes bind() visualizers much prettier).&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej&lt;/p&gt;
&lt;p&gt;Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7079980</link><pubDate>Sat, 12 Jan 2008 00:54:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7079980</guid><dc:creator>Cory Nelson</dc:creator><description>&lt;p&gt;I am also disappointed to not see stdint. &amp;nbsp;Having to make typedefs in portable code gets old quick.&lt;/p&gt;
&lt;p&gt;stdint and inttypes are both very simple, is there no way for them to be included?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7082023</link><pubDate>Sat, 12 Jan 2008 04:06:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7082023</guid><dc:creator>memodude</dc:creator><description>&lt;p&gt;Agreed. cstdint is necessary, not to mention ridiculously easy to implement. There's no excuse not to ship a standard header file which consists of nothing but a small set of extremely useful typedefs.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7087376</link><pubDate>Sat, 12 Jan 2008 12:38:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7087376</guid><dc:creator>mochi</dc:creator><description>&lt;p&gt;Since we are talking about Visualizers, does anyone else have this problem - on Vista w/ VC2005 SP1 (w/ vista update), no [Visualizer]s seem to work at all.&lt;/p&gt;
&lt;p&gt;My [AutoExpands] work properly, but I cannot even get STL container of ints to visualize as you would expect (e.g. I get {_Myfirst=0x003d4ea0 _Mylast=0x003d4eb4 _Myend=0x003d4eb8 } instead of {[2](x,y)}.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7087479</link><pubDate>Sat, 12 Jan 2008 12:49:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7087479</guid><dc:creator>mochi</dc:creator><description>&lt;p&gt;Btw, this is on Visual Studio 2005 Standard, though I can't see why that would make a difference.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7087689</link><pubDate>Sat, 12 Jan 2008 13:09:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7087689</guid><dc:creator>Pavel Minaev</dc:creator><description>&lt;p&gt;&amp;gt; I visualize tr1::function too; however, pointers-to-bases are a &amp;quot;brick wall&amp;quot; to visualizers, so I can only preview them with &amp;quot;empty&amp;quot; or &amp;quot;full&amp;quot;. Vaguely speaking, _Impl-&amp;gt;_Callee._Object stores the functor, but there's no way to get that into the preview.&lt;/p&gt;
&lt;p&gt;Not quite. You can get past a pointer-to-base with a cast if you know what's really there. And you can use the same trick you did for regex - storing a member identifying the actual type of the functor inside tr1::function for debug builds, at least for some commonly-used functor types (e.g. plain function pointers and bind expressions).&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7092024</link><pubDate>Sun, 13 Jan 2008 02:00:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7092024</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Cory Nelson]&lt;/p&gt;
&lt;p&gt;&amp;gt; I am also disappointed to not see stdint.&lt;/p&gt;
&lt;p&gt;I'd like to have cstdint in VC9 TR1 too, but remember the opportunity cost.&lt;/p&gt;
&lt;p&gt;If we had an extra day, week, or month to work on TR1, I'd want us and Dinkumware to look at regex perf.&lt;/p&gt;
&lt;p&gt;[mochi]&lt;/p&gt;
&lt;p&gt;&amp;gt; on Vista w/ VC2005 SP1 (w/ vista update), no [Visualizer]s seem to work at all.&lt;/p&gt;
&lt;p&gt;On my dev box (Server 2003 SP2 with VC8 SP1 Team Suite), visualizers work intermittently, which mystifies me. I had installed and uninstalled another edition of VC8 before, but hadn't done anything else unusual to that computer. (I'm 90% sure that my ordinary development work doesn't interact with the regular installation.) I really ought to nuke and pave that machine, but I'm waiting to get a quad-core.&lt;/p&gt;
&lt;p&gt;[Pavel Minaev]&lt;/p&gt;
&lt;p&gt;&amp;gt; Not quite. You can get past a pointer-to-base with a cast if you know what's really there.&lt;/p&gt;
&lt;p&gt;&amp;gt; And you can use the same trick you did for regex - storing a member identifying the actual&lt;/p&gt;
&lt;p&gt;&amp;gt; type of the functor inside tr1::function for debug builds, at least for some commonly-used&lt;/p&gt;
&lt;p&gt;&amp;gt; functor types (e.g. plain function pointers and bind expressions).&lt;/p&gt;
&lt;p&gt;Function pointers, okay - given a tr1::function&amp;lt;FT&amp;gt;, if it holds a function pointer, that's of type FT *. That's a good idea. But bind expressions, no - the type of a bind expression is highly variable, depending on more than its signature.&lt;/p&gt;
&lt;p&gt;regex's representation was almost completely opaque (except for the flags with which it was constructed), so the enhanced regex visualizer is rather valuable. I could imagine it being hard to track down the string from which a regex was constructed (especially in the case of constructing a regex from input iterators), even though the usual case is to have a const regex constructed from a string literal. tr1::function's representation, on the other hand, is obnoxious to pick through the first time, but does contain all of the information you want. So the need for an enhanced visualizer is less (although it sure would be convenient).&lt;/p&gt;
&lt;p&gt;I'll take a look at how simple it would be to add a &amp;quot;stores a function pointer&amp;quot; bool to tr1::function, although I suspect that it would require adding some overloads. Anything that could destabilize the implementation would be Bad. (regex's _Visualization didn't need any new overloads, so there was no danger of breaking something else. At worst, we'd forget to update the _Visualization when we should.)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>Visual C++ 2008 Feature Pack 베타</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7104925</link><pubDate>Mon, 14 Jan 2008 08:47:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7104925</guid><dc:creator>bkchung's WebLog</dc:creator><description>&lt;p&gt;Visual C++ Team Blog : MFC Beta Now Available Download details VC++ 2008 Libraries Feature Pack Beta&lt;/p&gt;
</description></item><item><title>Visual C++ 2008 Feature Pack 베타</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7105193</link><pubDate>Mon, 14 Jan 2008 09:40:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7105193</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;Visual C++ Team Blog : MFC Beta Now Available Download details VC++ 2008 Libraries Feature Pack Beta&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7110147</link><pubDate>Mon, 14 Jan 2008 21:04:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7110147</guid><dc:creator>Dave</dc:creator><description>&lt;p&gt;Can we use MFC/TR1 for native/win32 programming and not MFC?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7110763</link><pubDate>Mon, 14 Jan 2008 22:17:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7110763</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Dave]&lt;/p&gt;
&lt;p&gt;&amp;gt; Can we use MFC/TR1 for native/win32 programming and not MFC?&lt;/p&gt;
&lt;p&gt;I don't understand your question, can you clarify it?&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7111664</link><pubDate>Tue, 15 Jan 2008 00:10:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7111664</guid><dc:creator>mikeb</dc:creator><description>&lt;P&gt;Hey - everyone who says Microsoft needs to provide stdint.h. There's a public domain version available (from the MinGW toolset):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.cs.colorado.edu/~main/cs1300/include/stdint.h" target=_new rel=nofollow&gt;http://www.cs.colorado.edu/~main/cs1300/include/stdint.h&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It required some tweaks for my use (to make the 64-bit stuff work with VC6 - I don't remember if changes were needed for any other MS compiler version). &amp;nbsp;I know that MS should provide this with the compiler (and I sure have no idea why they don't), but until they decide to you can have your portability in this small area with little in the way of maintainability headaches since it's not interdependent on other bits of the library - it's just a bunch of typedefs and macros.&lt;/P&gt;</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7112107</link><pubDate>Tue, 15 Jan 2008 00:54:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7112107</guid><dc:creator>Dave</dc:creator><description>&lt;p&gt;- I mean, Is TR1 an specific feature for MFC users? if not , why did you distribute it along with MFC update?&lt;/p&gt;
&lt;p&gt;- after compiling with this new patch ,is distribution of updated CRT enough ?&lt;/p&gt;
&lt;p&gt;No new libraries needed to distribute? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7112819</link><pubDate>Tue, 15 Jan 2008 02:14:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7112819</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Dave]&lt;/p&gt;
&lt;p&gt;&amp;gt; I mean, Is TR1 an specific feature for MFC users?&lt;/p&gt;
&lt;p&gt;No. It has nothing whatsoever to do with MFC.&lt;/p&gt;
&lt;p&gt;&amp;gt; if not , why did you distribute it along with MFC update?&lt;/p&gt;
&lt;p&gt;Read the third Q&amp;amp;A above:&lt;/p&gt;
&lt;p&gt;&amp;quot;Q: If I use TR1, will I gain a dependency on MFC? Or, if I use the MFC updates, will I gain a dependency on TR1?&lt;/p&gt;
&lt;p&gt;A: No. The TR1 and MFC updates don't interact. They're just being distributed together for simplicity.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;gt; after compiling with this new patch ,is distribution of updated CRT enough ?&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;&amp;gt; No new libraries needed to distribute?&lt;/p&gt;
&lt;p&gt;Correct. TR1 involves no additional DLLs.&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7115686</link><pubDate>Tue, 15 Jan 2008 08:16:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7115686</guid><dc:creator>scorpion007</dc:creator><description>&lt;p&gt;Is VC 2005 still going to get service packs and updates? The product lifecycle website says mainstream support ends 2011 and extended support ends 2016. I'm hoping you don't just forget about it.&lt;/p&gt;
&lt;p&gt;After all, VC6 had 6 service packs.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7118703</link><pubDate>Tue, 15 Jan 2008 18:56:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7118703</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Good question scorpion007!! &lt;/p&gt;
&lt;p&gt;I'm also curious if VC 2005 will get more SPs. &amp;nbsp;I too remember the relatively frequent SPs for VC6 and I miss getting semi-regular service packs. &amp;nbsp;IMHO, VS has turned into a money-machine where developers need to buy new versions to get fixes that used to be in Service Packs.&lt;/p&gt;
&lt;p&gt;Looking at it from a different angle. &amp;nbsp;VS6 SPs were sort of a conversation (feedback loop) between VS producers and consumers: Each SP addressed either recent or longstanding significant issues. Continued support was something like iterative. &amp;nbsp; Then (with VS 2002, 2003, and 2005) continued support appears to be more Waterfall: A customer gets one SP and that's it, so you'd better like it. &lt;/p&gt;
&lt;p&gt;I prefer Iterative development and support.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7119387</link><pubDate>Tue, 15 Jan 2008 21:43:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7119387</guid><dc:creator>Jesse W. Towner</dc:creator><description>&lt;P&gt;A developer could implement stdint.h/cstdint and test cases for it in an afternoon or less, especially if you have the licensed Dinkumware implementation to work from.&lt;/P&gt;
&lt;P&gt;It shouldn't interact with any of the other STL or TR1 code, there's no reason to refactor any of it to use cstdint. It's isolated from everything else. This is probably one of the easiest TR1 features to get right.&lt;/P&gt;
&lt;P&gt;You would seriously be doing everyone a service by shipping it. Here's hoping you will reconsider. ^_^&lt;/P&gt;</description></item><item><title>千呼万唤始出来的 Visual C   2008 Feature Pack 介绍</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7130320</link><pubDate>Wed, 16 Jan 2008 15:24:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7130320</guid><dc:creator>Michael Lee</dc:creator><description>&lt;p&gt;缘起： 自VisualC 5.06.0以来一直遭人诟病的是什么？过于简单的界面控件！&lt;/p&gt;
&lt;p&gt;作为一个以VisualC 作为开发工具的程序员，遇到最郁闷的事情是什么？开发一个具有漂...&lt;/p&gt;
</description></item><item><title>千呼万唤始出来的 Visual C   2008 Feature Pack 介绍</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7130411</link><pubDate>Wed, 16 Jan 2008 15:31:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7130411</guid><dc:creator>Michael Lee</dc:creator><description>&lt;p&gt;缘起： 自VisualC 5.06.0以来一直遭人诟病的是什么？过于简单的界面控件！&lt;/p&gt;
&lt;p&gt;作为一个以VisualC 作为开发工具的程序员，遇到最郁闷的事情是什么？开发一个具有漂...&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7131009</link><pubDate>Wed, 16 Jan 2008 16:23:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7131009</guid><dc:creator>ikk</dc:creator><description>&lt;P&gt;&amp;lt;quote&amp;gt;&lt;/P&gt;
&lt;P&gt;Hey - everyone who says Microsoft needs to provide stdint.h. There's a public domain version available (from the MinGW toolset):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.cs.colorado.edu/~main/cs1300/include/stdint.h" target=_new rel=nofollow&gt;http://www.cs.colorado.edu/~main/cs1300/include/stdint.h&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It required some tweaks for my use&lt;/P&gt;
&lt;P&gt;&amp;lt;/quote&amp;gt;&lt;/P&gt;
&lt;P&gt;It is exactly those tweaks that developers should not need to do. That's the point of stdint/inttypes: it should be provided by the implementation so that we can be sure that changes in the implementation are reflected in stdint.&lt;/P&gt;
&lt;P&gt;BTW, boost also has stdint.&lt;/P&gt;</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7134799</link><pubDate>Thu, 17 Jan 2008 00:16:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7134799</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;Pavel Minaev - I am happy to report that the swap-optimization regression you found has just been fixed in mainline (and the comments have been updated to match the code). Thanks again for being so observant.&lt;/p&gt;
&lt;p&gt;Also, a bug has been fixed where replacing &amp;quot;A&amp;quot; with &amp;quot;x&amp;quot; in &amp;quot;AAAAAA&amp;quot; was producing &amp;quot;xAxAxA&amp;quot; instead of the correct &amp;quot;xxxxxx&amp;quot;. (I found this one myself, but someone also reported it through vcblog a day later!)&lt;/p&gt;
&lt;p&gt;Keep those bug reports coming!&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7138153</link><pubDate>Thu, 17 Jan 2008 05:08:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7138153</guid><dc:creator>mikeb</dc:creator><description>&lt;p&gt;&amp;lt;quote&amp;gt;&lt;/p&gt;
&lt;p&gt;It is exactly those tweaks that developers should not need to do. That's the point of stdint/inttypes: it should be provided by the implementation so that we can be sure that changes in the implementation are reflected in stdint.&lt;/p&gt;
&lt;p&gt;&amp;lt;/quote&amp;gt;&lt;/p&gt;
&lt;p&gt;True. &amp;nbsp;but if you aren't going to get it from Microsoft (and that looks to be the case in the near future) and you want or need it, then it's an option. &amp;nbsp;And, since it public domain there are absolutely no licensing issues (though Boost's license is pretty dang close to PD as well).&lt;/p&gt;
&lt;p&gt;The boost version is C++ only (which may be fine for some people). &amp;nbsp;Then again, the version I pointed to doe snot have a cstdint variant for C++, and it has some deficiencies properly defining pointer-sized values on 64-bit builds. &amp;nbsp;Anyone who wants a correct version for Win64 should maybe get the latest from MinGW at:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.mingw.org/download.shtml"&gt;http://www.mingw.org/download.shtml&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As for changes I had to make in my case, I'm pretty sure I'll have no good luck getting a version of stdint.h from MS for VC6, even if they ever deliver one for VC 2008+.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7138384</link><pubDate>Thu, 17 Jan 2008 05:47:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7138384</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;VC6 is no longer supported by Microsoft.&lt;/p&gt;
&lt;p&gt;(&amp;quot;Good riddance,&amp;quot; I said, referring only to the compiler and libraries, which were hideously nonconformant.)&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7142064</link><pubDate>Thu, 17 Jan 2008 18:03:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7142064</guid><dc:creator>Richard Webb</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I've tried running the Boost regression tests on VC9 with the feature pack, and they are showing up a number of apparent issues with the beta TR1.&lt;/p&gt;
&lt;p&gt;For example, from type_traits:&lt;/p&gt;
&lt;p&gt;-std::tr1::is_const&amp;lt;type[N]&amp;gt;::value always seems to be true&lt;/p&gt;
&lt;p&gt;-std::tr1::remove_const&amp;lt;const type[N]::type always seems to be 'type const[N]'.&lt;/p&gt;
&lt;p&gt;Using the Boost versions of type_traits, the results are false and 'type[N]'.&lt;/p&gt;
&lt;p&gt;The Boost/VC9/TR1 test results are viewable at &amp;lt;&lt;a rel="nofollow" target="_new" href="http://beta.boost.org/development/tests/trunk/developer/tr1.html&amp;gt;"&gt;http://beta.boost.org/development/tests/trunk/developer/tr1.html&amp;gt;&lt;/a&gt;, in the column &amp;quot;RW_WinXP_VC&amp;quot;.&lt;/p&gt;
&lt;p&gt;Does anyone have any comments on these in general, or should i just raise the possible issues on the connect site?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7145507</link><pubDate>Fri, 18 Jan 2008 05:42:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7145507</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Richard Webb]&lt;/p&gt;
&lt;p&gt;&amp;gt; I've tried running the Boost regression tests on&lt;/p&gt;
&lt;p&gt;&amp;gt; VC9 with the feature pack, and they are showing up&lt;/p&gt;
&lt;p&gt;&amp;gt; a number of apparent issues with the beta TR1.&lt;/p&gt;
&lt;p&gt;Excellent; the more bugs that we can hammer out during the beta, the better.&lt;/p&gt;
&lt;p&gt;&amp;gt; -std::tr1::is_const&amp;lt;type[N]&amp;gt;::value always seems to be true&lt;/p&gt;
&lt;p&gt;&amp;gt; -std::tr1::remove_const&amp;lt;const type[N]::type always seems to be 'type const[N]'.&lt;/p&gt;
&lt;p&gt;N2157 ( &lt;a rel="nofollow" target="_new" href="http://tinyurl.com/2r54lo"&gt;http://tinyurl.com/2r54lo&lt;/a&gt; ), voted into the WP, clarifies that is_const&amp;lt;int[3]&amp;gt;::value is false, and is_const&amp;lt;const int[3]&amp;gt;::value is true, so VC's wrong there.&lt;/p&gt;
&lt;p&gt;It also clarifies that remove_const&amp;lt;const int[3]&amp;gt;::type is int[3], so VC's also wrong there.&lt;/p&gt;
&lt;p&gt;I have filed a bug about this (internal number 171837).&lt;/p&gt;
&lt;p&gt;&amp;gt; Does anyone have any comments on these in general,&lt;/p&gt;
&lt;p&gt;&amp;gt; or should i just raise the possible issues on the&lt;/p&gt;
&lt;p&gt;&amp;gt; connect site?&lt;/p&gt;
&lt;p&gt;If you could investigate the other issues and file Connect bugs about them, that'd be great. Please provide self-contained repros.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: vector performance</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7153462</link><pubDate>Sat, 19 Jan 2008 00:56:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7153462</guid><dc:creator>Ilijas Selimovic</dc:creator><description>&lt;p&gt;[Pavel Minaev]&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have had the same problems with the performance of std::vector. Maybe worse because my vectors had an average element count of 5. The result was my own vector implementation. Since I have analized the problem in detail, here are some explanations.&lt;/p&gt;
&lt;p&gt;Look at the folowing code which is called from the consructor:&lt;/p&gt;
&lt;p&gt;bool _Buy(size_type _Capacity)&lt;/p&gt;
&lt;p&gt;{	&lt;/p&gt;
&lt;p&gt;// allocate array with _Capacity elements&lt;/p&gt;
&lt;p&gt;_Myfirst = 0, _Mylast = 0, _Myend = 0;&lt;/p&gt;
&lt;p&gt;if (_Capacity == 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; return (false);&lt;/p&gt;
&lt;p&gt;else if (max_size() &amp;lt; _Capacity)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;_Xlen();	// result too long&lt;/p&gt;
&lt;p&gt;else&lt;/p&gt;
&lt;p&gt;{	// nonempty array, allocate storage&lt;/p&gt;
&lt;p&gt; &amp;nbsp;_Myfirst = this-&amp;gt;_Alval.allocate(_Capacity);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;_Mylast = _Myfirst;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;_Myend = _Myfirst + _Capacity;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;return (true);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;First look at &lt;/p&gt;
&lt;p&gt;_Myfirst = 0, _Mylast = 0, _Myend = 0;&lt;/p&gt;
&lt;p&gt;Could be transormed to (on wintel platforms)&lt;/p&gt;
&lt;p&gt;_Myfirst =_Mylast =_Myend;&lt;/p&gt;
&lt;p&gt;Lets have a look at&lt;/p&gt;
&lt;p&gt;if (max_size() &amp;lt; _Capacity)&lt;/p&gt;
&lt;p&gt;Does anybody need that check? Me not, but even if, the result of max_size is typicaly known at compiletime but the compiler leaves a function call and some computations.&lt;/p&gt;
&lt;p&gt;The really funny thing is, that allocate&lt;/p&gt;
&lt;p&gt;makes the same checks again, before calling new. The rest of the vector implementation has similar &amp;quot;features&amp;quot;.&lt;/p&gt;
&lt;p&gt;The implementation of vector cannot be called &lt;/p&gt;
&lt;p&gt;efficient for small element counts.&lt;/p&gt;
&lt;p&gt;If you can do without generalized allocators, have a look at yasli::vector, an implementation of Alexandrescu. &lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7171738</link><pubDate>Sun, 20 Jan 2008 15:40:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7171738</guid><dc:creator>Richard Webb</dc:creator><description>&lt;p&gt;[Stephan]&lt;/p&gt;
&lt;p&gt;I've opened a number of bugs @ Connect.&lt;/p&gt;
&lt;p&gt;However:&lt;/p&gt;
&lt;p&gt;There are a number of test failures for things where the WP (N2157+) is different from the TR1 draft (N1836). For example:&lt;/p&gt;
&lt;p&gt;-the result of is_base_of&amp;lt;int, int&amp;gt;&lt;/p&gt;
&lt;p&gt;-the behaviour of is_convertible&amp;lt;&amp;gt; with void types&lt;/p&gt;
&lt;p&gt;So the expected results depend on which spec you're following. (see &lt;a rel="nofollow" target="_new" href="http://tinyurl.com/yw9zcb"&gt;http://tinyurl.com/yw9zcb&lt;/a&gt; for a bit more info on the Boost tests in question).&lt;/p&gt;
&lt;p&gt;Can you confirm whether these issues are considered bugs in the feature pack?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Richard Webb&lt;/p&gt;
</description></item><item><title>Support du TR1 dans Visual Studio 2008</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7176185</link><pubDate>Mon, 21 Jan 2008 00:37:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7176185</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;Soma annonce sur son blog le support du TR1 dans Visual Studio 2008 . Vous pouvez t&amp;#233;l&amp;#233;charger la b&amp;#233;ta&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7178935</link><pubDate>Mon, 21 Jan 2008 05:44:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7178935</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Richard Webb]&lt;/p&gt;
&lt;p&gt;&amp;gt; I've opened a number of bugs @ Connect.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&amp;gt; Can you confirm whether these issues are considered bugs in the feature pack?&lt;/p&gt;
&lt;p&gt;I haven't yet looked at all of the bugs you opened. In general - where N2157 clarifies or corrects TR1, we'll want to follow N2157. Obviously, we'll ignore C++0x-specific changes in N2157 (e.g. is_rvalue_reference).&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7203151</link><pubDate>Wed, 23 Jan 2008 03:05:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7203151</guid><dc:creator>scorpion007</dc:creator><description>&lt;p&gt;@Jared, heh. Might be because the service packs take forever to install nowadays, MS doesn't want to bother with them ;)&lt;/p&gt;
&lt;p&gt;VC 6 ones were a lot faster. But of course, as time moves on, things get bigger and [maybe?] better.&lt;/p&gt;
&lt;p&gt;I've submitted some bugs myself, and hope the fix gets back ported to VC 2005.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7206979</link><pubDate>Wed, 23 Jan 2008 12:31:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7206979</guid><dc:creator>好男人</dc:creator><description>&lt;p&gt;the regex doesn't work with subsystem:window application,when i did 2 undef about the max() and min(),it then worked.but still it was givin me memory leaks&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7207066</link><pubDate>Wed, 23 Jan 2008 12:45:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7207066</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;&amp;gt; the regex doesn't work with subsystem:window&lt;/p&gt;
&lt;p&gt;&amp;gt; application,when i did 2 undef about the max() and&lt;/p&gt;
&lt;p&gt;&amp;gt; min(),it then worked.&lt;/p&gt;
&lt;p&gt;We have an open bug about this, thanks. In the meantime, you can define NOMINMAX before including &amp;lt;windows.h&amp;gt;, which will prevent it from defining the min and max macros that stomp over &amp;lt;regex&amp;gt;.&lt;/p&gt;
&lt;p&gt;(In VC7.1, I think, &amp;lt;algorithm&amp;gt; was affected, but it has since been made immune. We'll simply extend this to TR1.)&lt;/p&gt;
&lt;p&gt;&amp;gt; but still it was givin me memory leaks&lt;/p&gt;
&lt;p&gt;Can you provide a self-contained test case that demonstrates this?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7215507</link><pubDate>Thu, 24 Jan 2008 06:56:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7215507</guid><dc:creator>好男人</dc:creator><description>&lt;p&gt;this a mfc dialog application&lt;/p&gt;
&lt;p&gt;i put:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;#include &amp;quot;stdafx.h&amp;quot;&lt;/p&gt;
&lt;p&gt;#include &amp;quot;regex_test_dlg.h&amp;quot;&lt;/p&gt;
&lt;p&gt;#include &amp;quot;regex_test_dlgDlg.h&amp;quot;&lt;/p&gt;
&lt;p&gt;#undef max&lt;/p&gt;
&lt;p&gt;#undef min&lt;/p&gt;
&lt;p&gt;#include &amp;lt;regex&amp;gt;&lt;/p&gt;
&lt;p&gt;using namespace std::tr1;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;at the beginning of the regex_test_dlgDlg.cpp file.&lt;/p&gt;
&lt;p&gt;then i put this &amp;quot;regex r(&amp;quot;aa&amp;quot;);&amp;quot; into OnInitDialog(),after that,i start the debug version program.when it's done,i get this &lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Detected memory leaks!&lt;/p&gt;
&lt;p&gt;Dumping objects -&amp;gt;&lt;/p&gt;
&lt;p&gt;{486} normal block at 0x00ED1B20, 20 bytes long.&lt;/p&gt;
&lt;p&gt; Data: &amp;lt;@4C &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt; 40 34 43 00 15 00 00 00 00 00 00 00 00 00 00 00 &lt;/p&gt;
&lt;p&gt;{485} normal block at 0x00ED1AC8, 24 bytes long.&lt;/p&gt;
&lt;p&gt;.................&lt;/p&gt;
&lt;p&gt;.................&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;do you get that?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7224252</link><pubDate>Thu, 24 Jan 2008 20:03:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7224252</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;好男人 has touched on something that I've wondered about for years.&lt;/p&gt;
&lt;p&gt;Why can't the VC++ memory leak detection code be extended, so that the Origin (Filename + source code line and/or class name) is captured? &amp;nbsp;You could then echo the Origin when you report each item in: &amp;quot;Dumping object -&amp;gt;&amp;quot;. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I appreciate VC++ detecting memory leaks, but notification of the leak isn't worth nearly as much as also knowing what actually leaked (which enables devs to more quickly fix leaks). &amp;nbsp;In the above post (by 好男人) it may be obvious what caused the memory leak. But, even in that case we are making an assumption and as a CS professor wisely told me: DON'T ASSUME! In large systems, it’s usually anything but obvious what leaked. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Am I missing something? &amp;nbsp;Is there an easy way to reconcile the detected memory leak to the actual source code or class? &amp;nbsp;(I'm sometimes &amp;nbsp;kind of dense).&lt;/p&gt;
&lt;p&gt;Thanks much.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7229767</link><pubDate>Fri, 25 Jan 2008 03:30:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7229767</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;Confirmed! regex is leaking memory. I've identified the problem and I'll file a bug about it immediately.&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej&lt;/p&gt;
&lt;p&gt;Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7236896</link><pubDate>Fri, 25 Jan 2008 11:59:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7236896</guid><dc:creator>scorpion007</dc:creator><description>&lt;p&gt;@Jared:&lt;/p&gt;
&lt;p&gt;Usually the debug CRT does in fact tell you what leaked, and where. You can even double-click in the IDE and it will take you right to the cause, provided it was identified correctly.&lt;/p&gt;
&lt;p&gt;I don't remember the specifics, but occasionally it doesn't show you the offending line.&lt;/p&gt;
&lt;p&gt;Anyway, here's an example which *does* show you the offending code.&lt;/p&gt;
&lt;p&gt;// compile with cl /D_DEBUG /MDd leak.cpp&lt;/p&gt;
&lt;p&gt;#define _CRTDBG_MAP_ALLOC&lt;/p&gt;
&lt;p&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;crtdbg.h&amp;gt;&lt;/p&gt;
&lt;p&gt;int main()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;	malloc(40); // leak 1&lt;/p&gt;
&lt;p&gt;	malloc(10); // leak 2&lt;/p&gt;
&lt;p&gt;	_CrtDumpMemoryLeaks();&lt;/p&gt;
&lt;p&gt;	return 0;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;0:000&amp;gt; g&lt;/p&gt;
&lt;p&gt;Detected memory leaks!&lt;/p&gt;
&lt;p&gt;Dumping objects -&amp;gt;&lt;/p&gt;
&lt;p&gt;leak.cpp(11) : {62} normal block at 0x001A3FB8, 10 bytes long.&lt;/p&gt;
&lt;p&gt; Data: &amp;lt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; CD CD CD CD CD CD CD CD CD CD&lt;/p&gt;
&lt;p&gt;leak.cpp(10) : {61} normal block at 0x001A1188, 40 bytes long.&lt;/p&gt;
&lt;p&gt; Data: &amp;lt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD&lt;/p&gt;
&lt;p&gt;Object dump complete.&lt;/p&gt;
&lt;p&gt;---------------------------------------------&lt;/p&gt;
&lt;p&gt;And another with C++ code, requires some adjustment:&lt;/p&gt;
&lt;p&gt;// compile with cl /D_DEBUG /MDd /EHsc leak2.cpp&lt;/p&gt;
&lt;p&gt;#define _CRTDBG_MAP_ALLOC&lt;/p&gt;
&lt;p&gt;#include &amp;lt;iostream&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;crtdbg.h&amp;gt;&lt;/p&gt;
&lt;p&gt;#ifdef _DEBUG&lt;/p&gt;
&lt;p&gt;#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)&lt;/p&gt;
&lt;p&gt;#define new DEBUG_NEW&lt;/p&gt;
&lt;p&gt;#endif&lt;/p&gt;
&lt;p&gt;int main()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; char *a = new char[10];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; char *b = (char*)malloc(20);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; _CrtDumpMemoryLeaks();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; return 0;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;0:000&amp;gt; g&lt;/p&gt;
&lt;p&gt;Detected memory leaks!&lt;/p&gt;
&lt;p&gt;Dumping objects -&amp;gt;&lt;/p&gt;
&lt;p&gt;leak2.cpp(17) : {62} normal block at 0x002011D0, 20 bytes long.&lt;/p&gt;
&lt;p&gt; Data: &amp;lt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD&lt;/p&gt;
&lt;p&gt;leak2.cpp(16) : {61} normal block at 0x00201188, 10 bytes long.&lt;/p&gt;
&lt;p&gt; Data: &amp;lt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; CD CD CD CD CD CD CD CD CD CD&lt;/p&gt;
&lt;p&gt;Object dump complete.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7242958</link><pubDate>Fri, 25 Jan 2008 20:20:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7242958</guid><dc:creator>ikk</dc:creator><description>&lt;p&gt;Nice tricks with _CrtDumpMemoryLeaks(), i didn't know much about it.&lt;/p&gt;
&lt;p&gt;It seems that the documentation is not that good, because i couldn't find _CRTDBG_MAP_ALLOC and DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__). But i admit that my search was not extensive.&lt;/p&gt;
&lt;p&gt;If you use _CrtDumpMemoryLeaks() without those macros, would it work? It's a little sad that such features are not easily available from the IDE. Or are they?&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7251056</link><pubDate>Sat, 26 Jan 2008 07:25:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7251056</guid><dc:creator>scorpion007</dc:creator><description>&lt;p&gt;Sorry about the slightly off-topic posts guys.&lt;/p&gt;
&lt;p&gt;@ikk, these links should be helpful:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/k70yt3e2%28VS.80%29.aspx"&gt;http://msdn2.microsoft.com/en-us/library/k70yt3e2%28VS.80%29.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/zh712wwf"&gt;http://msdn2.microsoft.com/en-us/library/zh712wwf&lt;/a&gt;(VS.80).aspx&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/974tc9t1%28VS.80%29.aspx"&gt;http://msdn2.microsoft.com/en-us/library/974tc9t1%28VS.80%29.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And all the related sub-topics, etc.&lt;/p&gt;
&lt;p&gt;Also, I recommend John Robbins' excellent book, which also covers the Debug CRT very nicely:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.amazon.com/Debugging-Applications-Microsoft-Windows-Pro-Developer/dp/0735615365"&gt;http://www.amazon.com/Debugging-Applications-Microsoft-Windows-Pro-Developer/dp/0735615365&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(Don't let the .NET in the title fool you, the majority of it is native)&lt;/p&gt;</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7252398</link><pubDate>Sat, 26 Jan 2008 09:47:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7252398</guid><dc:creator>scorpion007</dc:creator><description>&lt;p&gt;@ikk,&lt;/p&gt;
&lt;p&gt;The spam catcher stops me from posting anything containing multiple URLs, so I'll just tell you that you can find more info on MSDN -- just look for the Debug CRT, etc.&lt;/p&gt;
&lt;p&gt;Also, get John Robbin's book &amp;quot;Debugging Applications&amp;quot; which covers the Debug CRT and a lot more.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7290053</link><pubDate>Mon, 28 Jan 2008 19:55:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7290053</guid><dc:creator>H Zhang</dc:creator><description>&lt;p&gt;&amp;quot;A: Our implementation contains everything in TR1 except sections 5.2 and 8&amp;quot;&lt;/p&gt;
&lt;p&gt;But the beta reference_wrapper doesn't seem to be assignable. Are we going to have reference_wrapper&amp;amp; operator=(const reference_wrapper&amp;lt;T&amp;gt;&amp;amp; x)?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7292236</link><pubDate>Mon, 28 Jan 2008 23:10:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7292236</guid><dc:creator>H Zhang</dc:creator><description>&lt;p&gt;Here is a piece of my test code:&lt;/p&gt;
&lt;p&gt;struct A&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{ &lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;int f() {std::cout&amp;lt;&amp;lt;&amp;quot; f called\n&amp;quot;;return 8; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp;};&lt;/p&gt;
&lt;p&gt;A a;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;int (A::*pAf)() &amp;nbsp;= &amp;amp;A::f;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;std::tr1::function&amp;lt; int (A)&amp;gt; mf1(pAf);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;//std::tr1::function&amp;lt; int (A*)&amp;gt; mf2(pAf);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;//mf2(&amp;amp;a);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;mf1(a);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;boost::function&amp;lt;int (A)&amp;gt; bf1(&amp;amp;A::f);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;boost::function&amp;lt;int (A*)&amp;gt; bf2(&amp;amp;A::f);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;bf1(a);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;bf2(&amp;amp;a);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;std::tr1::mem_fn(pAf)(a);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;std::tr1::mem_fn(pAf)(&amp;amp;a);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;std::tr1::bind(pAf, a)();&lt;/p&gt;
&lt;p&gt; &amp;nbsp;std::tr1::bind(pAf, &amp;amp;a)();&lt;/p&gt;
&lt;p&gt;My question:&lt;/p&gt;
&lt;p&gt;Why the line std::tr1::function&amp;lt; int (A*)&amp;gt; mf2(pAf);&lt;/p&gt;
&lt;p&gt;won't work?&lt;/p&gt;
&lt;p&gt;Note that boost::function&amp;lt;int (A*)&amp;gt; bf2(&amp;amp;A::f); as well as all other lines, works fine.&lt;/p&gt;
&lt;p&gt;Is there a reason why it shouldn't be allowed?&lt;/p&gt;
&lt;p&gt;I couldn't figure it out from n1836. And I didn't have time to dig through the source code yet.&lt;/p&gt;
&lt;p&gt;Am I missing something?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7311842</link><pubDate>Tue, 29 Jan 2008 22:49:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7311842</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[H Zhang]&lt;/p&gt;
&lt;p&gt;&amp;gt; But the beta reference_wrapper doesn't seem to be&lt;/p&gt;
&lt;p&gt;&amp;gt; assignable.&lt;/p&gt;
&lt;p&gt;It is:&lt;/p&gt;
&lt;p&gt;C:\Temp&amp;gt;type ref.cpp&lt;/p&gt;
&lt;p&gt;#include &amp;lt;functional&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;iostream&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;ostream&amp;gt;&lt;/p&gt;
&lt;p&gt;using namespace std;&lt;/p&gt;
&lt;p&gt;using namespace std::tr1;&lt;/p&gt;
&lt;p&gt;int main() {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;int x = 100, y = 200;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;reference_wrapper&amp;lt;int&amp;gt; a(x), b(y);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;a += 10;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;b += 20;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;, &amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; endl;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;b = a;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;, &amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; endl;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;a += 1;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;b += 2;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &amp;quot;, &amp;quot; &amp;lt;&amp;lt; y &amp;lt;&amp;lt; endl;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;C:\Temp&amp;gt;cl /EHsc /nologo /W4 ref.cpp&lt;/p&gt;
&lt;p&gt;ref.cpp&lt;/p&gt;
&lt;p&gt;C:\Temp&amp;gt;ref&lt;/p&gt;
&lt;p&gt;110, 220&lt;/p&gt;
&lt;p&gt;110, 220&lt;/p&gt;
&lt;p&gt;113, 220&lt;/p&gt;
&lt;p&gt;&amp;gt; Why the line std::tr1::function&amp;lt; int (A*)&amp;gt; mf2(pAf);&lt;/p&gt;
&lt;p&gt;&amp;gt; won't work?&lt;/p&gt;
&lt;p&gt;That's a bug. I'll file a bug in our internal database.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7328970</link><pubDate>Wed, 30 Jan 2008 19:37:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7328970</guid><dc:creator>H Zhang</dc:creator><description>&lt;p&gt;You are right about my first question (&amp;quot;the beta reference_wrapper...&amp;quot;).&lt;/p&gt;
&lt;p&gt;I didn't investigate deep enough.&lt;/p&gt;
&lt;p&gt;I jumped to conclusion too fast when I saw this error:&lt;/p&gt;
&lt;p&gt;1&amp;gt;c:\users\hzhang\documents\visual studio 2008\projects\test\test.cpp(35) : error C2582: 'operator =' function is unavailable in 'std::tr1::reference_wrapper&amp;lt;_Ty&amp;gt;'&lt;/p&gt;
&lt;p&gt;Even though I cannot find a definition of 'operator =' in the source, I could assume that the trivial copy assignment operator bit-copies the internal pointer-to-type.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7332659</link><pubDate>Wed, 30 Jan 2008 22:34:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7332659</guid><dc:creator>Kris G</dc:creator><description>&lt;p&gt;This stuff is awesome, and really the only reason I want to upgrade to VC9 (a real, working, debuggable, shared_ptr class without having to install the giant mess that is boost)&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7336539</link><pubDate>Thu, 31 Jan 2008 03:29:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7336539</guid><dc:creator>H Zhang</dc:creator><description>&lt;p&gt;Having said that, something still puzzles me:&lt;/p&gt;
&lt;p&gt;void f(){cout&amp;lt;&amp;lt;&amp;quot;f&amp;quot;&amp;lt;&amp;lt;endl;}&lt;/p&gt;
&lt;p&gt;void g(){cout&amp;lt;&amp;lt;&amp;quot;g&amp;quot;&amp;lt;&amp;lt;endl;}&lt;/p&gt;
&lt;p&gt;typedef int*const cpi;&lt;/p&gt;
&lt;p&gt;typedef void (*const cpf)();&lt;/p&gt;
&lt;p&gt;int main()&lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;	int a = 100, b=120;&lt;/p&gt;
&lt;p&gt;	cpi cpia = &amp;amp;a;&lt;/p&gt;
&lt;p&gt;	cpi cpib = &amp;amp;b;&lt;/p&gt;
&lt;p&gt;	cpf cpf1 = &amp;amp; f;&lt;/p&gt;
&lt;p&gt;	cpf cpf2 = &amp;amp; g;&lt;/p&gt;
&lt;p&gt;	//cpia = cpib;//can't do this, we already know&lt;/p&gt;
&lt;p&gt;	//cpf1 = cpf2;//can't do this either, we all know&lt;/p&gt;
&lt;p&gt;	reference_wrapper&amp;lt;cpi&amp;gt; ra(cpia), rb(cpib);&lt;/p&gt;
&lt;p&gt;	reference_wrapper&amp;lt;cpf&amp;gt; rf(cpf1), rg(cpf2);&lt;/p&gt;
&lt;p&gt;	rf();&lt;/p&gt;
&lt;p&gt;	//rf = rg;//can we do this? the compiler won't&lt;/p&gt;
&lt;p&gt;	*ra += 1;&lt;/p&gt;
&lt;p&gt;	cout&amp;lt;&amp;lt;a&amp;lt;&amp;lt;&amp;quot; &amp;quot;;&lt;/p&gt;
&lt;p&gt;	ra= rb;//we can do this, the compiler does it&lt;/p&gt;
&lt;p&gt;	*ra += 2;&lt;/p&gt;
&lt;p&gt;	cout&amp;lt;&amp;lt;b&amp;lt;&amp;lt;endl;&lt;/p&gt;
&lt;p&gt;	return 0;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7359941</link><pubDate>Fri, 01 Feb 2008 01:14:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7359941</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;Another bug, I'll file it.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>Noise Reduction in VS2008 Profiler</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7365062</link><pubDate>Fri, 01 Feb 2008 06:01:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7365062</guid><dc:creator>Colin's Microsoft Developer Blog</dc:creator><description>&lt;p&gt;ProfilerOne of the new features in Visual Studio Team System (VS2008) is called Noise Reduction. This&lt;/p&gt;
</description></item><item><title>Noise Reduction in the VS2008 Profiler</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7365902</link><pubDate>Fri, 01 Feb 2008 06:49:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7365902</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;ProfilerOne of the new features in Visual Studio Team System (VS2008) is called Noise Reduction. This&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7523990</link><pubDate>Thu, 07 Feb 2008 22:31:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7523990</guid><dc:creator>Kim Gräsman</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I'm a little late to the game, but does the feature pack contain new redist MSIs for the CRT dlls?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;- Kim&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7622763</link><pubDate>Tue, 12 Feb 2008 01:30:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7622763</guid><dc:creator>mjf</dc:creator><description>&lt;p&gt;Can these libraries be used with Smart Device (Windows Mobile) projects?&lt;/p&gt;
</description></item><item><title>flaw in hash_set and unordered_set performance</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7837150</link><pubDate>Thu, 21 Feb 2008 16:18:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7837150</guid><dc:creator>gulli</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;during playing with the feature pack I found a performance characteristic that looks strange to me.&lt;/p&gt;
&lt;p&gt;A simple A*-example-App needs to test whether it has seen an unsigned long long before - any set-style class can handle that:&lt;/p&gt;
&lt;p&gt;std::set&amp;lt;unsigned long long&amp;gt; vals;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;while(...)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; unsigned long long val=...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; if(vals.insert(val).second)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//not yet seen&lt;/p&gt;
&lt;p&gt; &amp;nbsp; else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//seen&lt;/p&gt;
&lt;p&gt; &amp;nbsp; ...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Since stdext::hash_set and std::tr1::unordered_set (and mingw gcc 3.4.5 __gnu_cxx::hash_set) share this interface I made a perf comparison (for the mingw I had to implement the hash-function)&lt;/p&gt;
&lt;p&gt;The results are strange (just used task manager to measure cpu-time):&lt;/p&gt;
&lt;p&gt;using std::set mingw and vs 2008 keep pace:&lt;/p&gt;
&lt;p&gt;vs: 36 sec&lt;/p&gt;
&lt;p&gt;mingw: 35 sec&lt;/p&gt;
&lt;p&gt;using __gnu_cxx::hash_set shows the expected drop in computing time: 28 sec&lt;/p&gt;
&lt;p&gt;but the 2 VS2008 hash sets use a lot more computing time than before which renders them rather useless:&lt;/p&gt;
&lt;p&gt;stdext::hash_set: 50 sec&lt;/p&gt;
&lt;p&gt;std::tr1::unordered_set: 53 sec&lt;/p&gt;
&lt;p&gt;is there a way to adress this?&lt;/p&gt;
&lt;p&gt;thanks &lt;/p&gt;
&lt;p&gt;gulli&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7843055</link><pubDate>Fri, 22 Feb 2008 02:51:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7843055</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;[Kim Gr&amp;#228;sman]&lt;/p&gt;
&lt;p&gt;&amp;gt; I'm a little late to the game, but does the feature&lt;/p&gt;
&lt;p&gt;&amp;gt; pack contain new redist MSIs for the CRT dlls?&lt;/p&gt;
&lt;p&gt;Yes; otherwise, end users would be unable to run TR1-powered applications. VCRedist has also been updated (although VC recommends against its use).&lt;/p&gt;
&lt;p&gt;[mjf]&lt;/p&gt;
&lt;p&gt;&amp;gt; Can these libraries be used with Smart Device&lt;/p&gt;
&lt;p&gt;&amp;gt; (Windows Mobile) projects?&lt;/p&gt;
&lt;p&gt;Anything that can use VC9's STL can use TR1.&lt;/p&gt;
&lt;p&gt;[gulli]&lt;/p&gt;
&lt;p&gt;&amp;gt; flaw in hash_set and unordered_set performance&lt;/p&gt;
&lt;p&gt;I will investigate.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>re: Q&amp;A on our TR1 implementation</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7844020</link><pubDate>Fri, 22 Feb 2008 05:20:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7844020</guid><dc:creator>Stephan T. Lavavej [MSFT]</dc:creator><description>&lt;p&gt;I have filed a bug about our hash_set/unordered_set performance. (I also found an infinite loop bug in &amp;lt;random&amp;gt; while I was at it.)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stephan T. Lavavej, Visual C++ Libraries Developer&lt;/p&gt;
</description></item><item><title>Channel 9: Stephan T. Lavavej: Digging into C++ Technical Report 1 (TR1)</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7896479</link><pubDate>Tue, 26 Feb 2008 00:33:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7896479</guid><dc:creator>Visual C++ Team Blog</dc:creator><description>&lt;p&gt;Hello Recently we shipped a beta of our MFC/TR1 Feature Pack that, naturally enough, included a large&lt;/p&gt;
</description></item><item><title>Channel 9: Stephan T. Lavavej: Digging into C++ Technical Report 1 (TR1)</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#7896769</link><pubDate>Tue, 26 Feb 2008 01:23:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7896769</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;Hello Recently we shipped a beta of our MFC/TR1 Feature Pack that, naturally enough, included a large&lt;/p&gt;
</description></item><item><title>vc9 Feature Pack tr1 的一些问题</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8342752</link><pubDate>Sat, 29 Mar 2008 04:58:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8342752</guid><dc:creator>WuErPing</dc:creator><description>&lt;p&gt;vc9 Feature Pack tr1 的一些问题 一、头文件包含的问题 二、regex memory leak&lt;/p&gt;
</description></item><item><title>Visual C++ 2008 Feature Pack Released!</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8365235</link><pubDate>Mon, 07 Apr 2008 15:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8365235</guid><dc:creator>Visual C++ Team Blog</dc:creator><description>&lt;p&gt;The final release of the Visual C++ 2008 Feature Pack is now available for download. This release provides&lt;/p&gt;
</description></item><item><title>Visual C++ 2008 Feature Pack</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8365978</link><pubDate>Mon, 07 Apr 2008 20:41:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8365978</guid><dc:creator>Johan Lindfors</dc:creator><description>&lt;p&gt;Nu finns ett s&amp;amp;#229; kallat Feature Pack till Visual C++ 2008 att ladda he m f&amp;amp;#246;r alla kunder med&lt;/p&gt;
</description></item><item><title>Visual C++ 2008 Feature Pack Released</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8366044</link><pubDate>Mon, 07 Apr 2008 21:05:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8366044</guid><dc:creator>US ISV Developer Evangelism Team</dc:creator><description>&lt;p&gt;The final release of the Visual C++ 2008 Feature Pack is now available for download. This release provides&lt;/p&gt;
</description></item><item><title>Visual C++ 2008 Feature Pack Released</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8368110</link><pubDate>Tue, 08 Apr 2008 10:39:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8368110</guid><dc:creator>Ruud de Jonge</dc:creator><description>&lt;p&gt;Hello all, The final release of the Visual C++ 2008 Feature Pack is now available for download.&amp;amp;#160;&lt;/p&gt;
</description></item><item><title>C++ Gets Some Love</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8380340</link><pubDate>Fri, 11 Apr 2008 17:08:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8380340</guid><dc:creator>Is This Thing On?</dc:creator><description>&lt;p&gt;Good news from the C++ Team!! &amp;amp;#160; ================== The final release of the Visual C++ 2008 Feature&lt;/p&gt;
</description></item><item><title>Visual C++ 2008 Feature Pack Released</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8436756</link><pubDate>Tue, 29 Apr 2008 11:05:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8436756</guid><dc:creator>Andrew Coates ::: MSFT</dc:creator><description>&lt;p&gt;During my Windows Development session at the Heroes Happen { 2008 } launch shows around the country,&lt;/p&gt;
</description></item><item><title>TR1 Fixes In VC9 SP1</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#8848945</link><pubDate>Mon, 11 Aug 2008 22:37:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8848945</guid><dc:creator>Visual C++ Team Blog</dc:creator><description>&lt;p&gt;STL enjoys speaking in the third person and also enjoys bringing you this exclusive news: Visual Studio&lt;/p&gt;
</description></item><item><title>简介Visual C   2008 Feature Pack</title><link>http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx#9337543</link><pubDate>Sun, 18 Jan 2009 12:13:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9337543</guid><dc:creator>Henry Read</dc:creator><description>&lt;p&gt;无数的VisualC 程序员为了那几个单调、简单VisualC 的控件苦恼着；而无数的VisualC 程序员又因为这个界面问题而大发其财。BCGLibrary、MagicSkin这些...&lt;/p&gt;
</description></item></channel></rss>