Connect Bugs that I Fixed – Part II

I generate a new table of connect bugs that I have fixed after I published my last post: 749130 Compiler allows formation of cv-qualified reference-to-function type 754684 premature decay of function types in overloaded assignment operator 760058 Conditional (ternary) operator with throw expression produces lvalue rather than rvalue 761742 Failed to call destructor of a…


System.Uri in .Net 4.5 and un-escaping "%27"

I lost access to my MSDN blog account for some reason and regained it recently. I also spent some time figuring out how to get Windows Live Writer installed on Win10 which is much harder than I first thought (an easier way is described here). This post is a follow up to the previous two…


Debug vs Release – v2

Four and half a year ago (how time flies), I wrote a post about the potential issues mixing debug and release CRT in the same program. At the end, it says, ‘It’s fortunate that this is a linker error. Otherwise, you’ll waste lots of time in debugging to find out the subtle incompatibility’. Today, in…


Connect Bugs that I Fixed

Similar to STL’s post on vcblog, I generate a table of connect bugs that I have fixed after I officially worked on the compiler front end: Connect ID Title 581680 Lambda declaration cannot access closure variables when defined as a  member function of an inline class 584664 Visual C++ compiler crashes while trying to compile some templates…


November CTP of Visual C++ compiler, more C++11 features

Our team announced Novemeber CTP of Visual C++ compiler. It contains the following C++11 features besides those already in VS2012: Variadic templates Uniform initialization and initializer_lists Delegating constructors Raw string literals Explicit conversion operators Default template arguments for function templates


System.Uri doesn’t allow trailing dot

Again, System.Uri tries to be smart and does something on my behalf 🙁 This time, the victim is trailing dot (which is common in wiki pages). See this connect bug for details. The workaround is similar to the one described in this post. The only difference is that we need ‘GenericUriParserOptions.DontCompressPath’ instead.


C++: Under the Hood

This is an article written by Jan Gray. It is quite old, but most of the contents still apply today. The original article on MSDN can no longer be found. Here is the pdf version on OpenRCE: Overview: How are classes laid out? How are data members accessed? How are member functions called? What…


C++98 -> C++11: Pass by value or pass by reference?

In GoingNative 2012, there are some discussions on the new coding style for C++11. One interesting thing which is mentioned by Bjarne Stroustrup, Stephan T. Lavavej and Herb Sutter is the most efficient way to pass the argument. In C++98, pass by reference is in general more efficient because it saves extra copies (if the…


System.Uri doesn’t allow embedded escaped slashes

I use C# a lot to write small utilities and sometimes find that it is annoying to have to dig into the source code to figure out why .Net framework doesn’t work as I expected. This happens again when I am using LinkedIn API (BTW, this is the first occurence of such experience). LinkedIn API…


Speed up iostream

Throughput of iostream is considered much slower compared with its C counterpart. For example: printf(“1234567\n”); cout << “1234567” << endl; If you iterate 105 times, printf takes about 50ms while cout takes >1s. This looks quite annoying. After digging into the source of iostream (not an easy task 🙂 ), I finally figure out that…