Sign in
Van's House
I'm a developer at C++ team. I'm interested in everything related to C++
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
Bug
C#
C++
C++0x
C++11
GCC
Optimization
Reverse Engineering
VC
Archive
Archives
March 2013
(1)
December 2012
(1)
November 2012
(1)
February 2012
(3)
January 2012
(3)
May 2010
(6)
March 2010
(3)
November 2009
(1)
September 2009
(1)
August 2009
(1)
June 2009
(2)
May 2009
(2)
April 2009
(1)
March 2009
(1)
February 2009
(1)
January 2009
(1)
December 2008
(3)
October 2008
(2)
September 2008
(6)
August 2008
(3)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Van's House
Debug vs Release - v2
Posted
1 month ago
by
Xiang Fan
0
Comments
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...
Van's House
Connect Bugs that I Fixed
Posted
4 months ago
by
Xiang Fan
2
Comments
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...
Van's House
November CTP of Visual C++ compiler, more C++11 features
Posted
6 months ago
by
Xiang Fan
0
Comments
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...
Van's House
System.Uri doesn’t allow trailing dot
Posted
over 1 year ago
by
Xiang Fan
0
Comments
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...
Van's House
C++: Under the Hood
Posted
over 1 year ago
by
Xiang Fan
0
Comments
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: http://www.openrce.org/articles/files/jangrayhood.pdf . Overview...
Van's House
C++98 -> C++11: Pass by value or pass by reference?
Posted
over 1 year ago
by
Xiang Fan
0
Comments
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...
Van's House
System.Uri doesn’t allow embedded escaped slashes
Posted
over 1 year ago
by
Xiang Fan
6
Comments
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...
Van's House
Speed up iostream
Posted
over 1 year ago
by
Xiang Fan
0
Comments
Throughput of iostream is considered much slower compared with its C counterpart. For example: printf( "1234567\n" ); cout << "1234567" << endl; If you iterate 10 5 times, printf takes about 50ms while cout takes >1s. This looks...
Van's House
Protected or Private II
Posted
over 1 year ago
by
Xiang Fan
0
Comments
Someone reminds me that it has been nearly 2 years since my last blog post. How time flies! Many things happened during this period. I moved to Redmond and I’m now officially working on C++ compiler. The work is busy and also challenging. ...
Van's House
C++0x features in VC2010 - nullptr
Posted
over 3 years ago
by
Xiang Fan
0
Comments
Summary Page ( n3090.pdf is the current working draft of C++0x standard, it is available at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3090.pdf ) What we have before C++0x Everyone knows that null pointer value is NULL. In C...
Van's House
C++0x features in VC2010 - some decltype bugs
Posted
over 3 years ago
by
Xiang Fan
0
Comments
1. decltype(*&function) https://connect.microsoft.com/VisualStudio/feedback/details/510640 int foo(); decltype (*&foo) df; // it should be "int (&)()", but it is "int (*)()" The internal representation (it is special for...
Van's House
C++0x features in VC2010 - decltype
Posted
over 3 years ago
by
Xiang Fan
0
Comments
Summary Page ( n3090.pdf is the current working draft of C++0x standard, it is available at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3090.pdf ) What we have before C++0x When do generic programming in C++, you often have to...
Van's House
C++0x features in VC2010 - auto
Posted
over 3 years ago
by
Xiang Fan
1
Comments
Summary Page ( n3090.pdf is the current working draft of C++0x standard, it is available at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3090.pdf ) What we have before C++0x C++ is a strongly typed programming language. You have...
Van's House
C++0x features in VC2010 - static_assert
Posted
over 3 years ago
by
Xiang Fan
0
Comments
Summary Page ( n3090.pdf is the current working draft of C++0x standard, it is available at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3090.pdf ) What we have before C++0x It is a common task to output meaningful error message...
Van's House
C++0x features in VC2010 - Summary
Posted
over 3 years ago
by
Xiang Fan
0
Comments
VC2010 has been released for a while. It adds many C++0x features (The complete list can be found here: C++0x Core Language Features In VC10: The Table ) In the following posts, I’d like to share some of my experience of these new features. They...
Van's House
VC's "evil" extension: Pre-definition of basic types
Posted
over 3 years ago
by
Xiang Fan
0
Comments
In VC, you may find that you can use "size_t" directly without including any headers. size_t i = 0; int main() { atexit(0); } However, "size_t" is not a built-in type. It is a typedef in <stddef.h>. So what's the magic? In VC compiler, it...
Van's House
VC's "evil" extension: Implicit definition of static constant member
Posted
over 3 years ago
by
Xiang Fan
0
Comments
C++ supports in-class initialization of static integral constant members. It is nearly the same as enum, with the following difference (quoted from C++03 9.4.2.4 ([class.static.data])): The member shall still be defined in a namespace scope if it is...
Van's House
VC's "evil" extension: $
Posted
over 3 years ago
by
Xiang Fan
2
Comments
In C++, only a few characters can be used as part of the identifier. identifier: identifier-nondigit identifier identifier-nondigit identifier digit identifier-nondigit: nondigit universal-character-name other implementation-defined characters nondigit...
Van's House
Inline or Not Inline
Posted
over 4 years ago
by
Xiang Fan
0
Comments
What is inline? This keyword is mainly used to ask the compiler to inline substitution of the function body at the point of call. Like 'register', this is only a suggestion to the compiler. Modern compiler can handle inlining using advanced heuristic...
Van's House
Visual C++ Shanghai Team Blog is Online
Posted
over 4 years ago
by
Xiang Fan
0
Comments
I’m glad that our team blog is now online ( http://blogs.msdn.com/vcshblog/ ). It is in Chinese and is targeted to Chinese developers. We will write technical articles related to our work in Shanghai and also translate articles on VCBlog into Chinese...
Van's House
Output Text in Unicode
Posted
over 4 years ago
by
Xiang Fan
0
Comments
According to C standard, it only supports output text in MBCS (Multi-Byte Character String): n1124.pdf , 7.19.3/12 The wide character output functions convert wide characters to multibyte characters and write them to the stream as if they were written...
Van's House
IDA Pro 5.5 is released
Posted
over 4 years ago
by
Xiang Fan
1
Comments
IDA Pro 5.5 ships 12th of June 2009. The change list is here: http://www.hex-rays.com/idapro/55/index.htm
Van's House
Detect Shift Overflow
Posted
over 4 years ago
by
Xiang Fan
0
Comments
This is an intellectual exercise: when shifts a 32-bit unsigned integer in C++, how to detect whether the calculation overflows efficiently? Here is the function prototype. shl_overflow will return true if v << cl overflows (cl is between 0 and...
Van's House
Recursive Algorithm in C++
Posted
over 4 years ago
by
Xiang Fan
1
Comments
Many recursive algorithms have initial parameters. For example, Fibonacci Number is defined as: Fn = Fn-1 + Fn-2, with F1 = F2 = 1. By giving different values to F1 and F2, we can generate different sequence of numbers. 1. If we implement the algorithm...
Van's House
Measure Initialization Time of Global Variables
Posted
over 4 years ago
by
Xiang Fan
1
Comments
NOTICE: The technique describes in the article may not be supported in future release of VC. You should not use it in production code There are two kinds of initialization in C++: static initialization and dynamic initialization. According to the...
Page 1 of 2 (43 items)
1
2