<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Van's House</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/xiangfan/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/xiangfan/feed.xml</link>
    <description>I&amp;#039;m a developer at C++ team. I&amp;#039;m interested in everything related to C++</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:34:41 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Make your code faster to compile</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/make-your-code-faster-to-compile</link>
      <pubDate>Tue, 07 Mar 2017 21:17:57 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/?p=465</guid>
      <description><![CDATA[I'm recently investigating a VS feedback on compilation time.
There are some interesting findings...]]></description>
      <content:encoded><![CDATA[I'm recently investigating a VS feedback on compilation time.
There are some interesting findings during the investigation and I'd like to share them in this blog post.

Here is the <a href="https://gist.github.com/xiangfan-ms/359e4ef424625bdadec1fc2d2708792b">repro</a> to demonstrate the issue.

In the code, we define 512 classes. We also provide a global operator&lt;&lt; for each class.
The problem here is the definition of operator&lt;&lt;. The definition will call operator&lt;&lt; and this forces the compiler to do overload resolution.
The candidates includes,
<ol>
 	<li>All member operator&lt;&lt; defined in std::ostream</li>
 	<li>All global operator&lt;&lt;</li>
 	<li>All operator&lt;&lt; defined in std namespace which are found via ADL (argument dependent lookup)</li>
</ol>
Unfortunately, when we add more global operator&lt;&lt;, the candidate set of 2 also grows. This leads to O(n^2) time complexity (n is the number of global operator&lt;&lt; we add, which is 512 in the repro).
For each candidate, we need to validate whether the conversion from 'float' (the type of 's()') or 'const char [1]' (the type of '""') to the class is valid.
This is expensive because the class has a constructor which requires the compiler to validate its default template argument (it involves std::decay, which may furthur specialize 10+ other type traits).

While the code is conformant, there is room to improve its compile time with simple tweaks. Here are three possible ways,
<ol>
 	<li>If you know the exact type of the variable you want to serialize, you can call the member operator&lt;&lt; directly. This reduces the time complexity to O(n).</li>
 	<li>If you can group some classes into separate namespaces and define the operator&lt;&lt; in these namespaces, it will reduce the candiate set in 2. This reduces the time complexity to O(n^2/m) if m is the number of namespaces and each namespace contains n/m classes.</li>
 	<li>A more general solution is to use hidden friend. They can only be found via ADL, so they will not participate in the overload resolution of the operator&lt;&lt; for other classes. This also reduces the time complexity to O(n).</li>
</ol>
It may also be a good idea to put the definition of these operator&lt;&lt; to a separate .inl file and only include it if you need serialization. You don't want to pay cost to things you don't need :-).

BTW, in VC2017, we implement <a href="https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/">/permissive-</a> which disables some non-conformant behaviors. One side effect of the new option is that it improves the compile time when there are lots of global operators / hidden friends.

The following is a table comparing the compile time using VC2017:
<table border="1">
<tbody>
<tr>
<td width="156"></td>
<td width="156">Baseline</td>
<td width="156">/permissive-</td>
<td width="156">/permissive- + /DOPT</td>
</tr>
<tr>
<td width="156">/DTEST=0</td>
<td width="156">16.5s</td>
<td width="156">11.5s</td>
<td width="156">0.465s</td>
</tr>
<tr>
<td width="156">/DTEST=1</td>
<td width="156">16.0s</td>
<td width="156">11.4s</td>
<td width="156">1.19s</td>
</tr>
<tr>
<td width="156">/DTEST=2</td>
<td width="156">16.0s</td>
<td width="156">11.4s</td>
<td width="156">0.635s</td>
</tr>
</tbody>
</table>]]></content:encoded>
    </item>
    <item>
      <title>Connect Bugs that I Fixed - Part II</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/connect-bugs-that-i-fixed-part-ii</link>
      <pubDate>Wed, 24 Feb 2016 20:51:50 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2016/02/24/connect-bugs-that-i-fixed-part-ii/</guid>
      <description><![CDATA[I generate a new table of connect bugs that I have fixed after I published my last post:...]]></description>
      <content:encoded><![CDATA[<p>I generate a new table of connect bugs that I have fixed after I published my <a href="https://blogs.msdn.com/b/xiangfan/archive/2012/12/28/compiler-bugs-i-fixed.aspx">last post</a>:</p>  <table cellspacing="0" cellpadding="0" border="1"><tbody>     <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/749130">749130</a></td>        <td>Compiler allows formation of cv-qualified reference-to-function type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/754684">754684</a></td>        <td>premature decay of function types in overloaded assignment operator</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/760058">760058</a></td>        <td>Conditional (ternary) operator with throw expression produces lvalue rather than rvalue</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/761742">761742</a></td>        <td>Failed to call destructor of a temporary bound to a reference member (warning C4413)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/764446">764446</a></td>        <td>regression: cannot partially specialize class on ptr-to-funtion when function type is deduced</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/764598">764598</a></td>        <td>Bad codegen for user-defined assignment operator with function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/765392">765392</a></td>        <td>decltype of a pointer-to-member operator gets ref qualification wrong</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/765932">765932</a></td>        <td>C++/CLI compiler crashes when 'range-based for' is applied to cli::array</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/770431">770431</a></td>        <td>Internal Compiler Error even direct crash on code with std::initializer_list</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/773186">773186</a></td>        <td>#pragma execution_character_set(&quot;utf-8&quot;) didn't support in VC 2012.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/773773">773773</a></td>        <td>CLR compiler destroys temporary const object</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774517">774517</a></td>        <td>Empty initializer list cannot initialize private members</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774715">774715</a></td>        <td>LLU suffix not recognized</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774756">774756</a></td>        <td>some message in __declspec( deprecated( &quot;message&quot; ) ) is not printed properly.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774800">774800</a></td>        <td>Base class method build with the Visual Studio 2012 C++/CLR compiler fails to call the correct overriden virtual function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/775017">775017</a></td>        <td>Many parser issues in the new initialization syntax</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/775043">775043</a></td>        <td>cumulative dereferencing in decltype has no effect</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/775550">775550</a></td>        <td>Error C1001 in MSVC++ 2012 November CTP</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/775758">775758</a></td>        <td>fatal error C1001 in visual studio 2012 compiler with lambda function in struct initializer list</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/775807">775807</a></td>        <td>Variadic templates cannot std::forward lambda (C2065&amp;C2974)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/776438">776438</a></td>        <td>Failing template deduction for variadics</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/776606">776606</a></td>        <td>compile failed in some complicated case ( mixed with namespaces and variadic templates )</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/776619">776619</a></td>        <td>A bug related to the variadic templates argument pack for Microsoft Visual C++ Compiler Nov. 2012 CTP (v120_CTP_Nov2012)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/776640">776640</a></td>        <td>C++ Nov 2012 CTP Uniform Initialization compile fails but OK on GCC 4.7.0</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/776720">776720</a></td>        <td>ICE internal compiler error with uniform initialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/776877">776877</a></td>        <td>Compilation fails if there is a property that specifies the return value of its own type and a member function that receives an actual argument in C++/CX value class/value struct.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777184">777184</a></td>        <td>C++ compiler bug - vtable pointer put at wrong offset in 64-bit mode</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777231">777231</a></td>        <td>Fatal error C1001 with /Zi, #pragma auto_inline( off ), CArray, PCH</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777460">777460</a></td>        <td>compile failed : trying variatic template parameter pack expansion of non-parameter pack</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777565">777565</a></td>        <td>variadic template bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777580">777580</a></td>        <td>initializer_list constructor not found</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777592">777592</a></td>        <td>Ellipsis inside catch clause is interpreted as parameter pack expansion</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777633">777633</a></td>        <td>Compilation problem in C++ november CTP concerning initializer-lists of aggregate types</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777722">777722</a></td>        <td>&quot;An internal error has occurred in the compiler&quot; in afxtempl.h</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/777921">777921</a></td>        <td>Delegating c'tor doesn't accept explicit target c'tor</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/778096">778096</a></td>        <td>Error C3546 when using decltype in pack expansion in function return type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/778440">778440</a></td>        <td>Brace-initialization fails in function argument list (C2275)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/779387">779387</a></td>        <td>VC++ Nov 2012 CTP doesn't support certain uniform initialization syntax.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/779396">779396</a></td>        <td>const keyword bug - allowed global uninitialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/779993">779993</a></td>        <td>VS2012 Update 1 C++ Compiler Allows Built-in Type Narrowing with List {} Initialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/780175">780175</a></td>        <td>c++ compiler crashes when creating function pointer using auto and initialising via brackets</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/780253">780253</a></td>        <td>Default parameters fails SFINAE compile with error: : too many template arguments</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/780279">780279</a></td>        <td>default template argument causes internal error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/780310">780310</a></td>        <td>Bad code generated for call to function with default argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/780467">780467</a></td>        <td>Template friends non-type parameter lists don't compile</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/780591">780591</a></td>        <td>unexpected error C2838 and error C2065</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/781214">781214</a></td>        <td>C++11 uniform initialization fails</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/781537">781537</a></td>        <td>Failed to specialize function template</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/781658">781658</a></td>        <td>VS2012 unmanaged c++ /clr-switch</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/781753">781753</a></td>        <td>Runtime issue in using native type with managed functions (C++/CLI)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/782026">782026</a></td>        <td>namespace lost when processing variadic (?) template parameters</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/782258">782258</a></td>        <td>Function call in void context returning by reference a structure with volatile member triggers bitwise copy of the structure's contents on the runtime stack</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/782891">782891</a></td>        <td>C++ Dependent template name resolution failed</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/783210">783210</a></td>        <td>C++ : Crash dereferencing vtable pointer on 64-bits platforms</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/784996">784996</a></td>        <td>template parameter pack &amp; catch statement</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/785446">785446</a></td>        <td>'decltype' does not get along with '-&gt;' operator and template typename argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/786311">786311</a></td>        <td>C1001 in boost/exception/detail/is_output_streamable.hpp 1.46.1</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/786444">786444</a></td>        <td>Forward declaration inside a namespace</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/787095">787095</a></td>        <td>Pointer to members accept void types and reference types</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/788672">788672</a></td>        <td>brace-init-list is not working with array initialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/788687">788687</a></td>        <td>C++ Compiler can't compile some code most likely due to some internal buffer overflow or some other buffered read issue</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/788748">788748</a></td>        <td>C++/CLI leaves variables uninitialized</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/788830">788830</a></td>        <td>C++/CLI 2 dimensional array allocation with unsigned long long size argument generates invalid code</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/788970">788970</a></td>        <td>C++/CLI: false positive C4570 on generic class with forward declaration</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/789739">789739</a></td>        <td>static assertion failure in c++ with v120_CTP_Nov2012</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/789748">789748</a></td>        <td>constructor with default parameters and initializer list</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/789788">789788</a></td>        <td>std::forward overload ambiguity</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/790146">790146</a></td>        <td>Visual C++ 11.0 fails to zero-initialize instance of derived class</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/790239">790239</a></td>        <td>rvalue reference bound to a function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/791137">791137</a></td>        <td>initializer_list handling broken, destructors of temporary objects called twice</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/791393">791393</a></td>        <td>C++ Compiler Front-end: Unable to use lambdas as default arguments</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/791408">791408</a></td>        <td>Internal Compiler Error for stack allocated class with protected destructor</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/791432">791432</a></td>        <td>C1001 internal error occurs in the compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/791939">791939</a></td>        <td>Issues with initializer lists (including compiler crash)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/792355">792355</a></td>        <td>Compiler confused about whether to use a initializer_list assignment operator</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/792704">792704</a></td>        <td>valid initialization of non-const reference from rvalue std::initializer_list</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/792891">792891</a></td>        <td>Internal error in the compiler when passing default value for pointer to member in a class template argument list.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/793506">793506</a></td>        <td>C++ base without constructor not initialized</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/793537">793537</a></td>        <td>Value-initialization leaves built-in types uninitialized</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/794406">794406</a></td>        <td>C++/CLI compiler inconsistency with C++ compiler regarding template function linkage</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/794875">794875</a></td>        <td>C1001 when passing undeclared identifier as template argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/794879">794879</a></td>        <td>error C1001: An internal error has occurred in the compiler.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/795018">795018</a></td>        <td>Using a #define on an enum class declaration causes error C2332</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/795290">795290</a></td>        <td>Accessibility of &quot;using&quot; declaration ignored when taking address of member function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/796520">796520</a></td>        <td>std::initializer_list&lt;T&gt; as first argument in constructor causes compilation error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/796593">796593</a></td>        <td>uniform initialization in decltype sometimes does not work</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/796679">796679</a></td>        <td>C++ Incorrect template selection(?), related to default template arg and use of enum type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/797212">797212</a></td>        <td>A lambda that captures nothing but takes a unique_ptr by value will not compile</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/797867">797867</a></td>        <td>compiler is out of heap space when compiling popular middle Expat</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/797935">797935</a></td>        <td>C++ compiler crashes when generating code for calling a pointer to a member function for classes</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/798439">798439</a></td>        <td>Visual C++ 2013 Preview Compiler Crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/798489">798489</a></td>        <td>C++: Syntax error with default initializer list in function prototype, works fine inside function definition</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/799653">799653</a></td>        <td>Different decltype behaviour when used in template vs non-template class</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/799873">799873</a></td>        <td>Detection of variable shadowing should be part of the regular C++ compile instead of /analyze</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800104">800104</a></td>        <td>Using CString in initializer lists causes crashes</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800192">800192</a></td>        <td>Error C2061 or C2146 with enum name on 28K offset boundary</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800229">800229</a></td>        <td>Using a friend operator that is declared inside a template class may cause a compiler error or even generate a wrong fuction call if the template has not been used in the file before</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800344">800344</a></td>        <td>fatal error C1001: An internal error has occurred in the compiler declaring friend functions in template classes</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800360">800360</a></td>        <td>Using Initializer List</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800364">800364</a></td>        <td>Initializer_list calls object destructor twice</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800375">800375</a></td>        <td>&quot;for each&quot; bug in c++ compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/800391">800391</a></td>        <td>Uniform initialization &amp; =default generate a &quot;uninitialized local variable used&quot; error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/801822">801822</a></td>        <td>C++: explicit conversion operator used for implicit conversion</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/802063">802063</a></td>        <td>ill-formed unified initialization syntax causes internal compiler error in Visual C++</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/802091">802091</a></td>        <td>LNK4006 reported for static const members that is initialized in the class definition</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/802151">802151</a></td>        <td>Anonymous Enums not working consistently with decltype and typedef</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/802160">802160</a></td>        <td>VC++ does not zero-initialize an object during value-initialization when a sub-member has a user-provided constructor</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/802400">802400</a></td>        <td>Constructors do not run for objects in arrays with more than MAX_INT elements.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/804654">804654</a></td>        <td>'this' pointer is not corrected when calling method imported from base class by a 'using' declaration</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/804687">804687</a></td>        <td>C++ program behaves differently compared to both gcc and clang</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/804731">804731</a></td>        <td>C++ 11 Initializer List Crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/804864">804864</a></td>        <td>Pointers to class members with virtual inheritance trigger bogus /RTCc checks on x64 platform under certain conditions</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/804888">804888</a></td>        <td>With Language Extension Enabled VC11 an explicit cast is not creating an rvalue from bit-fields</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/805330">805330</a></td>        <td>Program crashes without intermediate object</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/805360">805360</a></td>        <td>Error C1081 encountered in VS2013 Preview C++ compiler, but not encountered in earlier C++ compilers</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/806024">806024</a></td>        <td>C++ : internal compiler error(C1001) occors on template function with __forceinline friend</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/806196">806196</a></td>        <td>C++: Error C2794 when explicitly instantiating a function template overload of std::ceil (related to enable_if, SFINAE)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/806308">806308</a></td>        <td>std::string broken in vs2013</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/806347">806347</a></td>        <td>VS 2013 C++ Compiler Crash when using { } vs. ( ) in Templated Initialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/806526">806526</a></td>        <td>Default constructor initialization bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/806756">806756</a></td>        <td>When I attempt to give an unnamed instance created in uniform initialization to an unnamed instance's member function, C1001 is reported.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/806758">806758</a></td>        <td>using initializer list causes runtime crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/807081">807081</a></td>        <td>C++ Allows redefinition in for loop, which leads to variable appearing twice in Locals and not updating in Watch and Autos</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/807419">807419</a></td>        <td>Initializer lists leaking memory</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/807610">807610</a></td>        <td>First element of vector is destroyed (initializing from using initializer_list).</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/807634">807634</a></td>        <td>Stack overflow in recursive template with member function returning scoped enum</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/807716">807716</a></td>        <td>An internal error has occurred in the compiler - boot unit test</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/807966">807966</a></td>        <td>std::unordered_map&lt;&gt; initialization with operator= and initializer list when value type is vector causes memory leak</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808084">808084</a></td>        <td>Internal compiler error caused by friend of template class in namespace</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808089">808089</a></td>        <td>Internal compiler error when using argument-dependent lookup on std::make_pair</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808132">808132</a></td>        <td>std::is_*constructible&lt;T&gt;::value == true for abstract classes.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808135">808135</a></td>        <td>Normal function defines a declared-only template function.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808270">808270</a></td>        <td>wrong this pointer in member function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808441">808441</a></td>        <td>ICE when using uniform initialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808494">808494</a></td>        <td>VS2013 C++ compiler crash on default argument struct containing XMFLOAT4X4</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808737">808737</a></td>        <td>VS2013: fatal error C1001 : An internal error has occurred in the compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808767">808767</a></td>        <td>Internal compiler error when compiling C++</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808852">808852</a></td>        <td>Internal compiler error with std::map operations and braces in return statement.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808868">808868</a></td>        <td>Friend Declaration Not Applied Correctly to Inner Class</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/808960">808960</a></td>        <td>std::pair + uniform initialization == linker crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/809111">809111</a></td>        <td>fatal error C1001: An internal error has occurred in the compiler. While compiling managed C++</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/809240">809240</a></td>        <td>Internal compiler error when using std::remove_reference in template metaprogram</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/809243">809243</a></td>        <td>c++11 initializer lists as default argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/809591">809591</a></td>        <td>Visual Studio 2013 fails to compile friend declaration for a namespace template function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/809738">809738</a></td>        <td>C++ internal compiler error, when using brace init</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/809785">809785</a></td>        <td>Maybe a vs2013 C++ compiler bug when i use the C11 uniform initialization when pass function parameter</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/809961">809961</a></td>        <td>Wrong pointer to member conversion to bool from template argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/810005">810005</a></td>        <td>Internal compiler error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/810736">810736</a></td>        <td>VS2013 C++ initializer_list</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811133">811133</a></td>        <td>is_assignable&lt;double, double&gt; should be false</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811202">811202</a></td>        <td>Compilation problem with template function specialization and default arguments.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811291">811291</a></td>        <td>C++ standard library leaks memory in Debug build when using map/string and initializer lists</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811295">811295</a></td>        <td>C++ initializer_list for vector and string - nested initializer lists with vectors and strings fail to pass correctly constructed objects up the hierarchy</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811334">811334</a></td>        <td>Bug in VS 2013 support for explicit conversion operators</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811436">811436</a></td>        <td>VC++ is_destructible doesn't work</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811454">811454</a></td>        <td>Visual C++ static_assert on enum inside template fails (error C2338) when Code Analysis (/analyze) is enabled</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811575">811575</a></td>        <td>Visual C++ 2012 native code, deletes an object before the scope ends, if used with CLR compilation. Causing Crash.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811603">811603</a></td>        <td>Weird behavior of std::enable_if&lt;T&gt; produces C2995 in Visual C++.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811892">811892</a></td>        <td>__LINE__ causing compiler error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811920">811920</a></td>        <td>Resolving of ambiguous overload</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/812285">812285</a></td>        <td>VS13 Internal Compiler Error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/812287">812287</a></td>        <td>Visual C++ 2013: initializer_list + unique_ptr causes heap corruption</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/812346">812346</a></td>        <td>Problem with using cast to void with function arguments passed by reference of forwared-declared type.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/812364">812364</a></td>        <td>a fatal error for a template friend function with __forceinline on Visual Studio 2013</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/812497">812497</a></td>        <td>Internal compiler error when using C++11 with CTP Nov 2013</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/812557">812557</a></td>        <td>Failed uniform initialization throws error C2440: &quot;'&lt;function-style-cast&gt;': cannot convert from 'initializer-list' to ...&quot;</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/813307">813307</a></td>        <td>Internal compiler error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/813595">813595</a></td>        <td>C++ preprocessor incorrectly handling 'L' character</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/813845">813845</a></td>        <td>static const int member declaration treated as definition</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/814407">814407</a></td>        <td>VC++ SFINAE with decltype and member function pointer doesn't work</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/814689">814689</a></td>        <td>Compiler Fails with Internal Error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/814697">814697</a></td>        <td>First element of vector is destroyed (initializing from initializer_list)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/814840">814840</a></td>        <td>is_constructible returns invalid results in certain cases</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/814852">814852</a></td>        <td>C++: final on a class template is not honored</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/816270">816270</a></td>        <td>Visual C++ Compiler bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/816326">816326</a></td>        <td>Compiler crash calling functions with a format string and variadic args using a symbol that doesn't exist</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/816729">816729</a></td>        <td>VS 2013 compiler crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/816754">816754</a></td>        <td>Internal Compiler Error caused by a combination of a temporary variable and empty initializer_list being used to call a function.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/816917">816917</a></td>        <td>Visual C++ 2013 Update 1 -- Internal Compiler Error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/816952">816952</a></td>        <td>Specialization of function template cannot be passed as template parameter</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/817162">817162</a></td>        <td>Possible compiler bug found when inserting a temporary shared pointer into a vector</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/817284">817284</a></td>        <td>initializer_list: when created from derived types, destructor of some of the temporary are called twice, while other are missed.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/817516">817516</a></td>        <td>Member function template matching unable to disabiguate reference type from</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/817561">817561</a></td>        <td>C++11 Initializer List Bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/819105">819105</a></td>        <td>Too many files in include directory cause fatal error C1083: Cannot open include file</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/820976">820976</a></td>        <td>C1001 error for invalid reference initalization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/821155">821155</a></td>        <td>C++11 invalid list initialization in VC12</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/823306">823306</a></td>        <td>Compilation error initializer list braces on a struct that has an std::array member</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/825791">825791</a></td>        <td>SFINAE fails with unknown type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/826026">826026</a></td>        <td>VC++ ICE</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/828105">828105</a></td>        <td>VS Express 2013 C++, using default function template parameters can leat to compiler crashing</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/828354">828354</a></td>        <td>Visual C++: C1001 when accessing methods of default template argument dependent on other template argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/828534">828534</a></td>        <td>Object destructor called twice (possibly related to initializer lists)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/828772">828772</a></td>        <td>Error C1001 in cxxfe\sl\p1\c\trees.h, line 712 compiling nested stl static initializers with nested struct initializers</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/829232">829232</a></td>        <td>Compiler crash on initializing enum with int using initializer list</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/829761">829761</a></td>        <td>Error C1001 on empty initializer list passed to function that has output redirected to ostringstream</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/829934">829934</a></td>        <td>MSVC compiler crashes instead of C3861 (missing forward declaration)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/830870">830870</a></td>        <td>CTP_Nov2013 crash with boost::dynamic_bitset in debug mode</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/831732">831732</a></td>        <td>VC++: Minimal rebuild (/gm) not working always properly with in-class initialization fields.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/832106">832106</a></td>        <td>C1001: An internal error has occurred in the compiler.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/832608">832608</a></td>        <td>Error using pointer to function template specialization as default argument to template method</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/834783">834783</a></td>        <td>A Compile Bug caused by using declaration member</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/835159">835159</a></td>        <td>Cannot return vector&lt;unique_ptr&lt;T&gt; using brace-enclosed initializer from function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/835519">835519</a></td>        <td>Using an enum that has been forward declared with the &quot;class&quot; keyword crashes the compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/835690">835690</a></td>        <td>Potential bug with containers of pairs/tuples containing smart pointers</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/840000">840000</a></td>        <td>Visual Studio 2012 compiler bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/840767">840767</a></td>        <td>std::make_shared as a member initializer</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/841190">841190</a></td>        <td>Templated cast operator crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/841192">841192</a></td>        <td>Eigen fails to compile with CTP, but works with 2013 release</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/841299">841299</a></td>        <td>Unexpected undefined class error using std::is_base_of with C++/CLI code</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/844864">844864</a></td>        <td>Initializing hierarchical maps using initializers crashes</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/845159">845159</a></td>        <td>Uniform initialization fails on std::map with struct with string vector member as value</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/845632">845632</a></td>        <td>C1001 when compiling std::copy with rvalue parameters</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/845911">845911</a></td>        <td>Error C1001 in VS2013 when passing 2 (or more) direct-initialized objects to a function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/846103">846103</a></td>        <td>C++ C1001 related to grammar.y (L6171)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/846332">846332</a></td>        <td>Typename overlap in derived class</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/848078">848078</a></td>        <td>Incorrect overload resolution between initializer-list constructor and default constructor when returning an empty initializer list (return {})</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/849488">849488</a></td>        <td>MSVC compiler crashes with internal error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/849574">849574</a></td>        <td>Uniform initilization use wrong values</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/850834">850834</a></td>        <td>C1083 compilation fails to open include file from network drive (VS2013 only; VS2012 is OK)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/853244">853244</a></td>        <td>Compiler crash on template deduction</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/853313">853313</a></td>        <td>MSVC incorrectly allows conversion from string-literal to void*</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/860258">860258</a></td>        <td>C++ application crash when adding custom objects to std::vector</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/860275">860275</a></td>        <td>Compile failure passing an array by const reference to a template function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/864285">864285</a></td>        <td>undefined qualified type in for loop ICE</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/865619">865619</a></td>        <td>2013 November CTP: braced-init list internal error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/868175">868175</a></td>        <td>CompileError</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/870953">870953</a></td>        <td>crash using default function parameter</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/873989">873989</a></td>        <td>ICE on template specialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/874225">874225</a></td>        <td>MSVC compiler (selectively) allows assignment of std::unique_ptr to int.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/875119">875119</a></td>        <td>C++11 empty initializer invoking incorrect constructor</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/877632">877632</a></td>        <td>Internal compiler error in six lines of code</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/877912">877912</a></td>        <td>fatal error C1001: An internal error has occurred in the compiler.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/878106">878106</a></td>        <td>function template overload issue</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/880131">880131</a></td>        <td>C++ Empty In-Class Intializer List Crashes the Compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/881011">881011</a></td>        <td>in-class member pointer array initialization ICE's VS2013 update 2</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/883045">883045</a></td>        <td>Internal compiler error initializing nested vector with braces (Visual C++ 2013)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/884350">884350</a></td>        <td>internal compiler error when taking the address of a parenthesized constant floating point variable</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/884930">884930</a></td>        <td>Strange ambiguous compile error when forwarding multi-dimensional arrays</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/889548">889548</a></td>        <td>Conversion from unsigned short to long is wrongly classified as narrowing</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/892330">892330</a></td>        <td>Static variables within different lambda expression but with the same name incurs error LNK1179</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/893730">893730</a></td>        <td>Buffer overrun (C4789) when using non-empty initializer-list as default argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/893813">893813</a></td>        <td>VS &quot;14&quot; CTP: internal compiler error when compiling boost serialization</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/894312">894312</a></td>        <td>C2244 when declaration and definition template parameters don't match.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/895130">895130</a></td>        <td>MSVC crashes when given code which dereferences a pointer to data member of an incomplete type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/895697">895697</a></td>        <td>fatal error C1001 (internal error, p2symtab.c line 2681) when function parameter has nested initializer-list as default argument</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/898366">898366</a></td>        <td>C++ compile error on inherited const/non-const overloaded methods</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/899719">899719</a></td>        <td>visual studio 2013 c++ explicit conversion operator bug ?</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/900046">900046</a></td>        <td>MSVC 2013 emits a fatal error when declaring a conversion operator for an undeclared type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/903462">903462</a></td>        <td>C++ aggregate initialization of structs with non-trivial members in function argument list crashes at runtime</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/914574">914574</a></td>        <td>Incorrect overload resolution with inherited op()s</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/915061">915061</a></td>        <td>VC12 Update 3 RC: Boost 1.56 compiler crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/915230">915230</a></td>        <td>Inheriting ctors are hogging the syntax</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/917875">917875</a></td>        <td>Visual Studio 2013 Update 2, C++11: Value and aggregate initialization error.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/918010">918010</a></td>        <td>MSVC-12.0 crash with boost::function and boost::bind</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/919721">919721</a></td>        <td>Static variables with same name inside lambda functions produce conflicting COMDAT</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/920935">920935</a></td>        <td>Internal compiler error with default parameter and move semantics</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/921749">921749</a></td>        <td>Conversion operator for an undefined type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/925205">925205</a></td>        <td>Initializer list ambiguates in a really weird way</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/927068">927068</a></td>        <td>MSVC bug in Koenig-lookup (compiler doesn't find appropriate overload for function)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/930249">930249</a></td>        <td>Compiler error when returning a pair copnsiting of an int and a set of ints</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/933092">933092</a></td>        <td>Lambdas without captures warn about hiding external declarations</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/933699">933699</a></td>        <td>LNK2005 when defining static const member</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/934161">934161</a></td>        <td>Wrong uniform initialization of struct with std::function with lambda with capture list as member</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/934256">934256</a></td>        <td>C++: decltype (class::member) as a class template default argument @ function template context</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/936055">936055</a></td>        <td>Missing header causes compiler error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/939366">939366</a></td>        <td>explicit operator bool is not respected in constructor calls</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/941227">941227</a></td>        <td>Nested uniform initialization: wrong arguments are passed</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/941547">941547</a></td>        <td>Regression: New ICE in C++ compiler 2013 update 3</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/943112">943112</a></td>        <td>Object destructor called right away after creation on stack, not at the end of scope</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/947228">947228</a></td>        <td>Treatment of &quot;using&quot; with delete operator inconsistent with C++ standard</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/947754">947754</a></td>        <td>Compiler error on passing template function as an argument to a function with ellipsis</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/960077">960077</a></td>        <td>decltype gives wrong type for member-object pointer access</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/960301">960301</a></td>        <td>constructor, using, compile error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/967397">967397</a></td>        <td>Incorrect conversion handling in C++</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/968574">968574</a></td>        <td>Cannot use nested types as return type when a nested type is within a base class and is made visible with the using keyword</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/973916">973916</a></td>        <td>&quot;std::unique_ptr&quot; move constructor skipped by SFINAE</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/973984">973984</a></td>        <td>Destruction of a class containing std::string that has been default-initialized using uniform initialization syntax crashes</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/977990">977990</a></td>        <td>(VS2014_CTP3)C++ compiler crash when invalid function declaration is in code</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/978911">978911</a></td>        <td>C2883 triggered when class is defined in a function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/979234">979234</a></td>        <td>Compiler crash (C1001) and runtime errors when using aggregate initializers</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/981380">981380</a></td>        <td>fatal error C1001: An internal error has occurred in the compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/982805">982805</a></td>        <td>Double delete performed on aggregate initialized rvalue struct function parameter accepted by value</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/984105">984105</a></td>        <td>Bug with initializing an dynamic array through an Initializer List</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/984571">984571</a></td>        <td>Deconstructor not run on objects</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/988442">988442</a></td>        <td>Visual C++ 14 CTP3: c++11 inheriting constructor bug?</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/990223">990223</a></td>        <td>&quot;overloaded lambda&quot; pattern fails to compile</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/996625">996625</a></td>        <td>std::is_pod is not standard conformant</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/999878">999878</a></td>        <td>c++ explicit operator ignored when using bool operator</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1005984">1005984</a></td>        <td>Mutable references are allowed by C++ compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1006520">1006520</a></td>        <td>fatal error C1001: Internal compiler error @msc1.cpp, line 1325</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1006826">1006826</a></td>        <td>C++: static std::array in class causes compiler error. Works fine in Clang/LLVM 3.5svn</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1007225">1007225</a></td>        <td>VC14 CTP4: Boost.Assign broken</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1007347">1007347</a></td>        <td>Compiler Bug: &quot;ambiguous call to overloaded function&quot; when providing explicit template arguments</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1007795">1007795</a></td>        <td>Internal Compiler Error (compiler file 'f:\dd\vctools\compiler\cxxfe\sl\p1\c\cast.c', line 703) with code that compiles with clang</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1008261">1008261</a></td>        <td>C++ compiler incorrectly interprets result of cast as lvalue not rvalue per standard</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1008573">1008573</a></td>        <td>Function template fails equality with enumerations in SFINAE context</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1015579">1015579</a></td>        <td>C++11 using inherited constructor bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1023049">1023049</a></td>        <td>Regression:Visual Studio &quot;14&quot; CTP C++ specialized result template regression</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1023608">1023608</a></td>        <td>is_pod does not allow user-defined constructors</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1034079">1034079</a></td>        <td>Fails to compile valid C++ code</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1039350">1039350</a></td>        <td>VC++ &quot;fatal error C1075: the left parenthesis '(' was umatched..&quot; line number wrong</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1040259">1040259</a></td>        <td>MSVC 2015 Preview rejects valid C++ program attempting to use conversion operator with assignment</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1042748">1042748</a></td>        <td>C++ compiler: C1001 when having a wrong default template argument value</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1045946">1045946</a></td>        <td>Build error happens when we try to define a class member outside a class which in turn is part of a template class on VS2014 CTP.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1046918">1046918</a></td>        <td>MSVC compiler version 19.00.22318 bug with SFINAE</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1049738">1049738</a></td>        <td>cl.exe hangs on .cpp file that ends with &quot;__declspec(&quot;</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1051667">1051667</a></td>        <td>compiler crash in old C program</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1055176">1055176</a></td>        <td>error C1001: An internal error has occurred in the compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1060757">1060757</a></td>        <td>namespace error in precompiled header</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1085306">1085306</a></td>        <td>(Incomplete) Code physically crashes compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1085387">1085387</a></td>        <td>Compiler fails to locate a symbol in unnamed namespace when looking up with the :: operator.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1087858">1087858</a></td>        <td>Warning C4456 Issued for nested for each loops in C++/CLI</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1088933">1088933</a></td>        <td>C++11 example at 20.9.7.6.4 produces incorrect compilation result (std::result_of related)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1097734">1097734</a></td>        <td>Internal compiler error with a template friend declaration</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1145303">1145303</a></td>        <td>Compiler crash when using templates and inherited constructor (c++)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1146769">1146769</a></td>        <td>Valid template code fails to compile</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1152733">1152733</a></td>        <td>internal compile error of class template which gets even not instantiated (C++)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1159488">1159488</a></td>        <td>Compiler reports error on valid code (friend declarations, with scoped operator== function template, with varying template parameter counts)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1159957">1159957</a></td>        <td>Copy constructor with ellipsis not called</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1163010">1163010</a></td>        <td>compile error with using std::declval (C++)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1163832">1163832</a></td>        <td>C++ type_traits header issue (at least std::is_member_function_pointer)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1170406">1170406</a></td>        <td>fatal error in inline namespace test</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1171114">1171114</a></td>        <td>MSVC crashes while generating default constructor closure</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1171122">1171122</a></td>        <td>MSVC spuriously diagnoses an error regarding multiple declarations/definitions where none exists</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1176789">1176789</a></td>        <td>MSVC 2015 when targeting x86 miscompiles program by omitting default constructor closure</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1181174">1181174</a></td>        <td>Bitfield initialized with non-constant initializer is never initialized</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1218804">1218804</a></td>        <td>crash unwinding stack when throwing from a constructor</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1229066">1229066</a></td>        <td>C++11 template does not compile</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1244883">1244883</a></td>        <td>(Copy) is not called; use of initialized object;</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1256498">1256498</a></td>        <td>Compiler crash on some cases with decltype and enum class elements.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1301538">1301538</a></td>        <td>Mixed with 'constexpr', 'enum' causes error.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1307662">1307662</a></td>        <td>Problem using constrexp, uniform initialization, and dllimport</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1343873">1343873</a></td>        <td>SFINAE error message is highly misleading</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1354377">1354377</a></td>        <td>Function template already defined with SFINAE</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1354485">1354485</a></td>        <td>C++ compiler error around certain combinations of sizeof &amp; std::enable_if in templates</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1372513">1372513</a></td>        <td>C++. Two loops in one function enable redeclaring function's parameter</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1373986">1373986</a></td>        <td>Unsigned template parameter is printed as signed</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1374087">1374087</a></td>        <td>Static assertion fails</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1375647">1375647</a></td>        <td>Alias template fails SFINAE</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1375698">1375698</a></td>        <td>MSVC 2015 RC - C++ Obscure Cross-Influence Effect when using std::enable_if_t for overload resolution</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1402441">1402441</a></td>        <td>VC14 RC - alignas doesn't work correctly with pack expansions</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1410386">1410386</a></td>        <td>Inherited constructor with no arguments considered as derived class' default constructor</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1410388">1410388</a></td>        <td>Inherited templated constructor in local class-type causes an internal compiler error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1415072">1415072</a></td>        <td>Unexpected compiled error on correct c++11 code</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1419449">1419449</a></td>        <td>internal compiler error on inline namespaces</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1445778">1445778</a></td>        <td>MSVC 2015 allocates virtual displacement map in the .data section</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1454637">1454637</a></td>        <td>Define queue with reference type of stored elements will cause crash of C++ compiler</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1459726">1459726</a></td>        <td>Microsft (R) C/C++ Optimizing Compiler has stopped working</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1464651">1464651</a></td>        <td>VC++ templated function pointer overload resolution failure</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1471758">1471758</a></td>        <td>Internal compiler error on template specizalization using declspec and an enum class</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1477264">1477264</a></td>        <td>error C2027: use of undefined type 'exb::sqllike::sqllike_expr&lt;Expr&gt;'</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1486401">1486401</a></td>        <td>boost.proto virtual member example fails to compile.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1492102">1492102</a></td>        <td>MSVC 2015 crashes on assignment to decltype(auto) when deduction from overloaded function fails</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1501876">1501876</a></td>        <td>MSVC 2015 RC - C++ Constructor Declaration not Found</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1505624">1505624</a></td>        <td>SFINAE fails with enumerations</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1507116">1507116</a></td>        <td>Template ambiguates at link-time</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1508770">1508770</a></td>        <td>C++ Passing template arguments to a different template breaks when more than one argument is involved</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1537582">1537582</a></td>        <td>decltype(auto) with return R-Value reference</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1544565">1544565</a></td>        <td>sizeof... bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1544635">1544635</a></td>        <td>Wrong type deduction with decltype</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1544714">1544714</a></td>        <td>C/C++ Optimizing Compiler crash</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1554016">1554016</a></td>        <td>Internal compiler error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1555645">1555645</a></td>        <td>CL crass when parsing an asm block</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1558084">1558084</a></td>        <td>MSVC 2015 crashes when given invalid explicit specialization of static data member</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1559695">1559695</a></td>        <td>error C1001: internal error has occured</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1576822">1576822</a></td>        <td>File from year 1601 causes fatal error C1073: Internal error involving incremental compilation</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1590961">1590961</a></td>        <td>Internal Compiler Error in 10 Lines</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1591761">1591761</a></td>        <td>C++: Template argument deduction fails for non-type parameter with sizeof...() operator</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1613182">1613182</a></td>        <td>C++: C1001 with decltype and pointer to virtual function.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1623667">1623667</a></td>        <td>enable_if'd default constructor causes C2535 in derived class inheriting base constructors</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1626305">1626305</a></td>        <td>C++: Passing a function pointer as a non-type template parameter fails if the the parameter type is specified as a dependent name</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1666626">1666626</a></td>        <td>Use of enable_if in template parameter list fails (regression from VC12)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1672205">1672205</a></td>        <td>error while using decltype(std::forward&lt;Args&gt;(args))... on empty parameter packs in function type in template in VC++14</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1706489">1706489</a></td>        <td>Access to base member seems to cast away reference-to-rvalue</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1717973">1717973</a></td>        <td>C++: const modifier on static member function definition does not result in a compile error</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1726563">1726563</a></td>        <td>C++: inheriting (default) constructor template produces duplicate definition</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1770779">1770779</a></td>        <td>C4458 erroneously reports shadowing of non-captured variables</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1790318">1790318</a></td>        <td>Compiler internal error when and using variadic templates in precompiled headers</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1791840">1791840</a></td>        <td>MSVC 2015 issues diagnostic with mangled name for redefinition of conversion operator</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1839232">1839232</a></td>        <td>decltype produces default arguments in its type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1841970">1841970</a></td>        <td>C++ CLI lambda regress (c4439, function definition with a managed type in the signature must have a __clrcall calling convention)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1842042">1842042</a></td>        <td>C++ warning C4458 false positive. (declaration of ? hides class member)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1853232">1853232</a></td>        <td>MSVC 2015 crashes on ill-formed constructor</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1882295">1882295</a></td>        <td>Compiler seems to have a distinguish problem with operator++() and operator++(int) by using templates</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1904679">1904679</a></td>        <td>C++ Compiler error when capturing a lambda parameter (with sfinae involved in a way)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1907574">1907574</a></td>        <td>Visual C++ build failure due to name collision</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1930098">1930098</a></td>        <td>Failing to specialize function template with classes with default int argument depending on type</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/1938836">1938836</a></td>        <td>Code compiles with clang and gcc but fails with Visual Studio 2015 RTM</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2046382">2046382</a></td>        <td>An internal error has occurred in the compiler.</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2050595">2050595</a></td>        <td>Compiler error regarding template method pointer types</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2086665">2086665</a></td>        <td>Ignore dereferencing function pointer issue</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2087449">2087449</a></td>        <td>template parameter pack treated as single parameter</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2109165">2109165</a></td>        <td>Inheriting ctors reject seemingly duplicate definition</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2117239">2117239</a></td>        <td>C++: decltype((e)) produces the incorrect type for base class members</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2123005">2123005</a></td>        <td>enum() accepted as nullpointer</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2154536">2154536</a></td>        <td>Internal compiler error (ICE) on some template metaprog in MSVC 2015.1</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2163090">2163090</a></td>        <td>Internal Compiler Error on some SFINAE code</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2173053">2173053</a></td>        <td>too few template arguments bug</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2173340">2173340</a></td>        <td>ICE with decltype of a template member function</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2188166">2188166</a></td>        <td>MSVC 2015 crashes with reference to __formal</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2188195">2188195</a></td>        <td>MSVC 2015 crashes when referencing type from within __vc_attributes</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2229371">2229371</a></td>        <td>deleted function breaks SFINAE</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2234621">2234621</a></td>        <td>C++/CLI Compiler Crash - operator true/false</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2242313">2242313</a></td>        <td>Compiler crash with C2065 and /errorReport:prompt</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2271910">2271910</a></td>        <td>ICE when using variadic version of BOOST_FUSION_ADAPT_TPL_STRUCT (only when using amd64/cl.exe)</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2286612">2286612</a></td>        <td>internal compiler error while building OpenSSL library</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2325403">2325403</a></td>        <td>internal compiler error while constructor inheritance</td>     </tr>      <tr>       <td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/2369346">2369346</a></td>        <td>OpenSSL 1.1.0-preX: fatal error C1001: An internal error has occurred in the compiler.</td>     </tr>   </tbody></table>  <p>These are only a small portion of bugs we have fixed, and there are still large amount of active bugs on which we are working.</p>  <p>If you find any bugs in the compiler, feel free to report them through <a href="https://connect.microsoft.com/VisualStudio">Microsoft Connect</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>System.Uri in .Net 4.5 and un-escaping "%27"</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/system-uri-in-net-4-5-and-un-escaping-'</link>
      <pubDate>Wed, 24 Feb 2016 00:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2016/02/24/system-uri-in-net-4-5-and-un-escaping-%27/</guid>
      <description><![CDATA[I lost access to my MSDN blog account for some reason and regained it recently. I also spent some...]]></description>
      <content:encoded><![CDATA[<p>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 <a href="https://msdev.pro/2015/12/30/lets-fix-windows-live-writer-on-win10/">here</a>).</p>
<p>This post is a follow up to the previous two <a href="https://blogs.msdn.com/b/xiangfan/archive/2012/02/06/system-uri-doesn-t-allow-trailing-dot.aspx">posts</a> complaining the System.Uri class. There is an idiom in Chinese which can be translated to &lsquo;Three and Out&rsquo;. But I hit an issue related to System.Uri the third time :-(.</p>
<p>The corresponding connect bug is <a href="https://connect.microsoft.com/VisualStudio/feedback/details/1840396">here</a>. The repro:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">void</span> Test() <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Uri</span> uri1 = <span style="color: #0000ff;">new</span>&nbsp;<span style="color: #2b91af;">Uri</span>(<span style="color: #a31515;">"https://en.wikipedia.org/wiki/%2751_Dons"</span>); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Uri</span> uri2 = <span style="color: #0000ff;">new</span>&nbsp;<span style="color: #2b91af;">Uri</span>(<span style="color: #a31515;">"https://en.wikipedia.org/wiki/%2738_%E2%80%93_Vienna_Before_the_Fall"</span>); <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Net.<span style="color: #2b91af;">WebClient</span> client = <span style="color: #0000ff;">new</span> System.Net.<span style="color: #2b91af;">WebClient</span>(); <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// https://en.wikipedia.org/wiki/%2751_Dons</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Console</span>.WriteLine(<span style="color: #a31515;">"{0}"</span>, uri1.AbsoluteUri); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// https://en.wikipedia.org/wiki/'38_%E2%80%93_Vienna_Before_the_Fall</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Console</span>.WriteLine(<span style="color: #a31515;">"{0}"</span>, uri2.AbsoluteUri); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// As you can see, the second Uri unescapes "%27" to "'" while the first doesn't.</span> <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// The second download will throw System.Net.WebException.</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// This is because wiki redirects '38_%E2%80%93_Vienna_Before_the_Fall back to %2738_%E2%80%93_Vienna_Before_the_Fall,</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// which becomes an infinite loop.</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client.DownloadString(uri1); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client.DownloadString(uri2); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>The un-escaping happens inside &lsquo;System.Uri.EnsureParseRemaining&rsquo; and its behavior is determined by the following helper &lsquo;System.UriHelper.IsReservedUnreservedOrHash&rsquo;:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #0000ff;">string</span> RFC2396ReservedMarks = <span style="color: #800000;">@";/?:@&amp;=+$,"</span>; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #0000ff;">string</span> RFC3986ReservedMarks = <span style="color: #800000;">@":/?#[]@!$&amp;'()*+,;="</span>; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #0000ff;">string</span> RFC2396UnreservedMarks = <span style="color: #800000;">@"-_.!~*'()"</span>; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #0000ff;">string</span> RFC3986UnreservedMarks = <span style="color: #800000;">@"-._~"</span>; <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">static</span>&nbsp;<span style="color: #0000ff;">unsafe</span>&nbsp;<span style="color: #0000ff;">bool</span> IsReservedUnreservedOrHash(<span style="color: #0000ff;">char</span> c) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">if</span> (IsUnreserved(c)) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">return</span>&nbsp;<span style="color: #0000ff;">true</span>; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">if</span> (<span style="color: #2b91af;">UriParser</span>.ShouldUseLegacyV2Quirks) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">return</span> ((RFC2396ReservedMarks.IndexOf(c) &gt;= 0) || c == <span style="color: #a31515;">'#'</span>); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">return</span> (RFC3986ReservedMarks.IndexOf(c) &gt;= 0); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } </p>
<p>So it appears to be a breaking change in .Net 4.5 mentioned <a href="https://blogs.msdn.microsoft.com/dotnet/2012/10/17/net-framework-4-5-off-to-a-great-start/">here</a>. Net 4.5 follows <a href="https://www.ietf.org/rfc/rfc3986.txt">RFC3986</a> while older versions follow <a href="https://www.ietf.org/rfc/rfc2396.txt">RFC2396</a> and they have different sets of reserved characters (%27 un-escapes to &lsquo;, which is only reserved in RFC3986).</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">enum</span>&nbsp;<span style="color: #2b91af;">UriQuirksVersion</span> { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// V1 = 1, // RFC 1738 - Not supported</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; V2 = 2, <span style="color: #008000;">// RFC 2396</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; V3 = 3, <span style="color: #008000;">// RFC 3986, 3987</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// Store in a static field to allow for test manipulation and emergency workarounds via reflection.</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// Note this is not placed in the Uri class in order to avoid circular static dependencies.</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">static</span>&nbsp;<span style="color: #0000ff;">readonly</span>&nbsp;<span style="color: #2b91af;">UriQuirksVersion</span> s_QuirksVersion =&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (BinaryCompatibility.TargetsAtLeast_Desktop_V4_5 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// || BinaryCompatibility.TargetsAtLeast_Silverlight_V6</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// || BinaryCompatibility.TargetsAtLeast_Phone_V8_0</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ? <span style="color: #2b91af;">UriQuirksVersion</span>.V3 : <span style="color: #2b91af;">UriQuirksVersion</span>.V2; <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">internal</span>&nbsp;<span style="color: #0000ff;">static</span>&nbsp;<span style="color: #0000ff;">bool</span> ShouldUseLegacyV2Quirks { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">get</span> { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">return</span> s_QuirksVersion &lt;= <span style="color: #2b91af;">UriQuirksVersion</span>.V2; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } </p>
<p>However, I believe this is actually a bug because the un-escaping isn&rsquo;t applied consistently (as shown by the repro above). The un-escaping only happens under the following conditions (if the uri contains non-ASCII unicode and Iri parsing is enabled):</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">if</span> (m_iriParsing &amp;&amp; hasUnicode){ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// In this scenario we need to parse the whole string </span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EnsureParseRemaining(); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } </p>
<p>The hack below depends on this inconsistency to work, though :-).</p>
<p>Anyway, unfortunately, my code depends on some 4.5 only features and I can&rsquo;t simply switch it back to the older .Net version. In fact, the component which triggers the issue only uses .Net 2.0.</p>
<p>So I have to hack again (after hours of debugging). BTW, when I was debugging the .Net source, the debugger incorrectly uses my source file instead of downloading the correct one from the source server (both file have the name &lsquo;Uri.cs&rsquo;). I enable &lsquo;Require source files to exactly match the original version&rsquo;, so I would expect the debugger to at least tell me that the wrong source file doesn&rsquo;t match the hash in pdb.</p>
<p>Unlike the previous two hacks, this one impacts all Uri objects because it has to change a static class member. Also, due to the nature of the issue (the Uri object is created by System.Net.WebClient internally, not me), it looks like the only viable option to me.</p>
<p>Here is the code snippet of the hack (setting this property to false will revert to pre-4.5 behavior):</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">public</span>&nbsp;<span style="color: #0000ff;">static</span>&nbsp;<span style="color: #0000ff;">bool</span> AllowIriParsing <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">get</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">FieldInfo</span> fieldInfoIriParsing = <span style="color: #0000ff;">typeof</span>(<span style="color: #2b91af;">Uri</span>).GetField(<span style="color: #a31515;">"s_IriParsing"</span>, <span style="color: #2b91af;">BindingFlags</span>.Static | <span style="color: #2b91af;">BindingFlags</span>.NonPublic); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">if</span> (fieldInfoIriParsing == <span style="color: #0000ff;">null</span>) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">throw</span>&nbsp;<span style="color: #0000ff;">new</span>&nbsp;<span style="color: #2b91af;">MissingFieldException</span>(<span style="color: #a31515;">"'s_IriParsing' field not found"</span>); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">return</span> (<span style="color: #0000ff;">bool</span>)fieldInfoIriParsing.GetValue(<span style="color: #0000ff;">null</span>); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">set</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">FieldInfo</span> fieldInfoIriParsing = <span style="color: #0000ff;">typeof</span>(<span style="color: #2b91af;">Uri</span>).GetField(<span style="color: #a31515;">"s_IriParsing"</span>, <span style="color: #2b91af;">BindingFlags</span>.Static | <span style="color: #2b91af;">BindingFlags</span>.NonPublic); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">if</span> (fieldInfoIriParsing == <span style="color: #0000ff;">null</span>) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">throw</span>&nbsp;<span style="color: #0000ff;">new</span>&nbsp;<span style="color: #2b91af;">MissingFieldException</span>(<span style="color: #a31515;">"'s_IriParsing' field not found"</span>); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fieldInfoIriParsing.SetValue(<span style="color: #0000ff;">null</span>, <span style="color: #0000ff;">value</span>); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } </p>
<p>How does the hack work? The trick is that if s_IriParsing is false, m_iriParsing will become null and disable the un-escaping logic. Note that IriParsing is disabled by default prior to .Net 4.5 (see <a href="https://msdn.microsoft.com/en-us/library/bb882600.aspx">this</a>).</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// Value from config Uri section</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #008000;">// On by default in .NET 4.5+ and cannot be disabled by config.</span> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">private</span>&nbsp;<span style="color: #0000ff;">static</span>&nbsp;<span style="color: #0000ff;">volatile</span>&nbsp;<span style="color: #0000ff;">bool</span> s_IriParsing =&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<span style="color: #2b91af;">UriParser</span>.ShouldUseLegacyV2Quirks ? <span style="color: #2b91af;">IriParsingElement</span>.EnabledDefaultValue : <span style="color: #0000ff;">true</span>); </p>
<p>Ideally, I prefer to alter &lsquo;<span style="color: #2b91af;">UriParser</span>.ShouldUseLegacyV2Quirks&rsquo; instead. But it is a property and checks against a read-only member we can&rsquo;t modify even with reflection.</p>]]></content:encoded>
    </item>
    <item>
      <title>Debug vs Release - v2</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/debug-vs-release-v2</link>
      <pubDate>Mon, 25 Mar 2013 20:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2013/03/25/debug-vs-release-v2/</guid>
      <description><![CDATA[Four and half a year ago (how time flies), I wrote a post about the potential issues mixing debug...]]></description>
      <content:encoded><![CDATA[<p>Four and half a year ago (how time flies), I wrote a <a href="https://blogs.msdn.com/b/xiangfan/archive/2008/08/30/debug-vs-release.aspx">post</a> about the potential issues mixing debug and release CRT in the same program.</p>
<p>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 v2, I'd like to share another example which I encountered in real-world code that demonstrates the subtle incompatibility.</p>
<p>Here are the two source files, which are used to generate a dll and an exe:</p>
<p>dll.cpp<br /><span style="color: #0000ff;">__declspec</span>(<span style="color: #0000ff;">dllexport</span>)&nbsp;<span style="color: #0000ff;">void</span>&nbsp;useenv();<br /> <br /> <span style="color: #0000ff;">#include</span>&nbsp;<span style="color: #a31515;">&lt;stdio.h&gt;</span><br /> <span style="color: #0000ff;">#include</span>&nbsp;<span style="color: #a31515;">&lt;stdlib.h&gt;</span><br /> <br /> <span style="color: #0000ff;">void</span>&nbsp;useenv()<br /> {<br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff;">wchar_t</span>&nbsp;*value;<br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af;">errno_t</span>&nbsp;err&nbsp;=&nbsp;_wdupenv_s(&amp;value,&nbsp;<span style="color: #0000ff;">nullptr</span>,&nbsp;L<span style="color: #a31515;">"ENV"</span>);<br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff;">if</span>&nbsp;(err&nbsp;==&nbsp;0)<br /> &nbsp;&nbsp;&nbsp;&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wprintf(L<span style="color: #a31515;">"ENV&nbsp;=&nbsp;%s\n"</span>,&nbsp;value);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(value);<br /> &nbsp;&nbsp;&nbsp;&nbsp;}<br /> }</p>
<p>exe.cpp<br /><span style="color: #0000ff;">#include</span>&nbsp;<span style="color: #a31515;">&lt;stdlib.h&gt;</span><br /> <br /> <span style="color: #0000ff;">__declspec</span>(<span style="color: #0000ff;">dllimport</span>)&nbsp;<span style="color: #0000ff;">void</span>&nbsp;useenv();<br /> <br /> <span style="color: #0000ff;">void</span>&nbsp;setenv(<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #0000ff;">wchar_t</span>&nbsp;*<span style="color: #808080;">value</span>)<br /> {<br /> &nbsp;&nbsp;&nbsp;&nbsp;_wputenv_s(L<span style="color: #a31515;">"ENV"</span>,&nbsp;<span style="color: #808080;">value</span>);<br /> }<br /> <br /> <span style="color: #0000ff;">int</span>&nbsp;main()<br /> {<br /> &nbsp;&nbsp;&nbsp;&nbsp;setenv(L<span style="color: #a31515;">"1"</span>);<br /> &nbsp;&nbsp;&nbsp;&nbsp;useenv();<br /> &nbsp;&nbsp;&nbsp;&nbsp;setenv(L<span style="color: #a31515;">"2"</span>);<br /> &nbsp;&nbsp;&nbsp;&nbsp;useenv();<br /> }</p>
<p>Build the program using the following command line:</p>
<p>cl dll.cpp /MDd /LD /nologo<br />cl exe.cpp /MD /nologo /link dll.lib</p>
<p>What output would you expect? If everything goes as expected, it should output '1' and '2' on two lines.</p>
<p>However, if you try the example above, the actual output are two '1's. Unlike linker errors, this kind of runtime issues is much harder to find and the fix normally involves changes to the build system / project files which are normally non-trivial.</p>
<p>Now, let's take a closer look at the example.</p>
<p>The magic is in the compiler options. The dll is compiled with /MDd (debug CRT) and the exe is compiled with /MD (release CRT). So 'setenv' calls '_wputenv_s' from release CRT, and 'useenv' calls '_wdupenv_s' from debug CRT,</p>
<p>'Why does this matter?', you may ask. This is because CRT maintains many global states internally. Debug CRT and release CRT both have their own copies, changes to one don't affect the other.</p>
<p>In this case, CRT maintains a cache to the wide string version of the environment variables and the cache is created when you access the environment variable for the first time. The complete process can be illustrated as follows:</p>
<ul>
<li>The first 'setenv' calls OS API to set the environment variables of the process and they are also cached in the release CRT.</li>
<li>The first 'useenv' tries to read the environment variables and they are not cached in the debug CRT yet. So it reads them from OS and creates the cache.</li>
<li>The second 'setenv' calls OS API and also updates the cached environment variables in the release CRT.</li>
<li>The second 'useenv' reads the environment variables directly from the cache in the debug CRT which are not changed.</li>
</ul>
<p>So the bug only appears when you call 'useenv' the second time because the cache is created but not correctly updated (I'm not sure whether the behavior of CRT is by-design, but apparently it assumes one CRT in the binary and no direct call to SetEnvironmentString).</p>
<p>It is much more subtle than always fail. Actually it took me quite a while to have a small example from the original code. The first few attempts always output '(null)' instead and you can easily know that sometime goes wrong from that :-)</p>
<p>This is just one of thousands of possibilities how mixing debug and release CRT (or any components compiled with different options) can mess up things. The best practice is to make sure everything is compiled with the same compiler options, but this is not always possible (for example, some libraries are from third party). Then you'd better be very cautious about mixing them in the same binary. Move the incompatible part to a separate dll with an abstract layer (so that there are no assumptions across binary boundary) may help.</p>]]></content:encoded>
    </item>
    <item>
      <title>Connect Bugs that I Fixed</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/connect-bugs-that-i-fixed</link>
      <pubDate>Fri, 28 Dec 2012 14:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2012/12/28/connect-bugs-that-i-fixed/</guid>
      <description><![CDATA[Similar&nbsp;to STL's post on vcblog, I generate a table of connect bugs&nbsp;that I have fixed...]]></description>
      <content:encoded><![CDATA[<p>Similar&nbsp;to STL's post on <a title="vcblog" href="https://blogs.msdn.com/b/vcblog/archive/2012/08/10/10338661.aspx">vcblog</a>, I generate a table of connect bugs&nbsp;that I have fixed after I officially worked on the compiler front end:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>Connect ID</td>
<td>Title</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/581680">581680</a></td>
<td>Lambda declaration cannot access closure variables when defined as a<br />&nbsp; member function of an inline class</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/584664">584664</a></td>
<td>Visual C++ compiler crashes while trying to compile some templates &amp;<br />&nbsp; inheritance code</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/611359">611359</a></td>
<td>C++ compiler: Temporary object created when it should not, thus making<br />&nbsp; code that worked in VC9 not work anymore!</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/612158">612158</a></td>
<td>Illegal C++ fails to generate C2039 error, allowing buffer overrun</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/619198">619198</a></td>
<td>[c++] Compiler fails to deduce template parameter.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/622382">622382</a></td>
<td>fatal error C1001: An internal error has occurred in the compiler</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/622723">622723</a></td>
<td>Const pointer sign extension not consistent in 64-bit compiler.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/623481">623481</a></td>
<td>Compiler crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/624283">624283</a></td>
<td>Private copy operator vs __declspec(dllexport)</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/624378">624378</a></td>
<td>Can I double&amp;&amp; in template</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/624757">624757</a></td>
<td>Incorrect function template deduction involving pointor to member data</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/625710">625710</a></td>
<td>Compilation error in case of repeating forward declaration within class</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/633274">633274</a></td>
<td>C++ compiler allows use of unspecialized member function template</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/633782">633782</a></td>
<td>C++ #pragma secion doesn't allow read,write,execute</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/634671">634671</a></td>
<td>Bug with operator overloading and nested lambdas</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/634688">634688</a></td>
<td>Wrong return type when running nested lambda</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/634966">634966</a></td>
<td>Argument dependent lookup chooses the wrong function inside sizeof<br />&nbsp; statements</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/636634">636634</a></td>
<td>Unexpected error C2751 reported at 'using namespace' directive inside a<br />&nbsp; lambda expression.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/637539">637539</a></td>
<td>using namespace a::b; does not work in a lambda defined on the root<br />&nbsp; level.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/640228">640228</a></td>
<td>compiler template declaration/definition mismatch error</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/640281">640281</a></td>
<td>C++/CLI compiler crashes when attempting to compile event<br />&nbsp; System::EventHandler&lt;&gt;;</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/640356">640356</a></td>
<td>decltype does not seem to work ok with operator, expressions</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/641032">641032</a></td>
<td>Lambda's automagic ctor gets wrong signature (or call) when implicit and<br />&nbsp; explicit capture is mixed.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/649496">649496</a></td>
<td>Visual C++ doesn't respect the access modifier for operator member<br />&nbsp; function templates</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/649953">649953</a></td>
<td>Incorrect code generated when returning struct by value and compiling for<br />&nbsp; x86.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/650667">650667</a></td>
<td>Incorrect IDE error</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/651255">651255</a></td>
<td>C++ CLI property overriding and renaming</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/657040">657040</a></td>
<td>Buggy static_assert</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/661294">661294</a></td>
<td>Wrong "this" pointer when using templates in C++ and targeting<br />&nbsp; x64 Platform</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/663659">663659</a></td>
<td>Large arrays with const size can crash at run-time on win64</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/663884">663884</a></td>
<td>VC10: weird template deduction error with non-type default template<br />&nbsp; argument</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/667226">667226</a></td>
<td>private template operators in C++ treated as public</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/668375">668375</a></td>
<td>Unexpected error for legal code</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/669603">669603</a></td>
<td>std algorithm functions do not compile in certain case</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/674241">674241</a></td>
<td>C++ Lambda unable to access parts of types in containing method</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/674442">674442</a></td>
<td>Enumeration with negative values are popping C4341 warnings</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/674672">674672</a></td>
<td>Callee disassembly expects address which caller is not providing in x64<br />&nbsp; mode</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/675321">675321</a></td>
<td>fatal error C1001: An internal error has occurred in the compiler.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/676037">676037</a></td>
<td>CL crashes while compiling specific line (see description)</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/678194">678194</a></td>
<td>decltype strips "member" property from member function pointers</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/678295">678295</a></td>
<td>C++ compiler loses member-ness of pointer-to-member-function during<br />&nbsp; template deduction, causes ICE</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/679623">679623</a></td>
<td>Incorrectly duplicating object when it is a native one(NDT) in<br />&nbsp; vs2010sp1(C++)</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/679716">679716</a></td>
<td>Bug in VC++ 2010 with global refence to array</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/684720">684720</a></td>
<td>C++: Inconsistent explicit interface override behavior</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/684900">684900</a></td>
<td>template template parameters don't work with unions</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/684807">684807</a></td>
<td>C2216 'override' cannot be used with 'inline'</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/685461">685461</a></td>
<td>C++ compiler bug in certain situation involving using declaration and<br />&nbsp; overloaded base member functions</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/686324">686324</a></td>
<td>cl static assertion parsing error</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/687345">687345</a></td>
<td>Local class and lambda</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/687935">687935</a></td>
<td>Ambiguous call to overloaded function in c++ when using lambdas</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/688106">688106</a></td>
<td>Fatal Error C1001</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/688107">688107</a></td>
<td>C2466 emitted twice for the same construct</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/688198">688198</a></td>
<td>Invalid error error C2871 when using functions defined within nested<br />&nbsp; namespaced in lambdas.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/688443">688443</a></td>
<td>C2143 emitted twice for the same construct</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/689504">689504</a></td>
<td>C2326 on Lambdas with [this]-Capture</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/689815">689815</a></td>
<td>std::result_of not working with lambdas</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/696310">696310</a></td>
<td>C2027 emitted multiple times compiling deque with an incomplete stored<br />&nbsp; class</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/696412">696412</a></td>
<td>Compiling local static auto object causes internal compiler error</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/697086">697086</a></td>
<td>VC++ cannot resolve function overload as template parameter</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/697006">697006</a></td>
<td>C4430 emitted twice for the same construct</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/697512">697512</a></td>
<td>Internal compiler error while compiling specific initializer of global<br />&nbsp; object.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/698459">698459</a></td>
<td>VS Stop Working in Win7</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/698688">698688</a></td>
<td>auto compiler error with multiple name declaration</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/704352">704352</a></td>
<td>The function pointer types estimated by template are wrong</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/704624">704624</a></td>
<td>Memory leaks with lambda expressions</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/706674">706674</a></td>
<td>compile error C2663 in lambda, if boost 1.48 posix_time.hpp is included.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/706537">706537</a></td>
<td>shared_ptr and lambda function crash with C1001</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/715680">715680</a></td>
<td>D8030: INTERNAL COMPILER ERROR&nbsp;</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/716372">716372</a></td>
<td>C++ - fatal error C1001 when using static local variable with non-trivial<br />&nbsp; constructor in static local lambda</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/718297">718297</a></td>
<td>Access private function</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/718578">718578</a></td>
<td>VS2010 C++ Template Member Functions in Lambdas Error</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/718729">718729</a></td>
<td>[C++] Reference default argument falsely converted to pointer on<br />&nbsp; instantiation of more than 2 explicit specializations</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/720670">720670</a></td>
<td>C++ type equality not recognized under SFINAE context</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/724319">724319</a></td>
<td>Failed to compile program using boost::program_options and lambda<br />&nbsp; expression&nbsp;</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/724362">724362</a></td>
<td>decltype がサイズが 0 の配列への参照を作れる / decltype can generate references of zero<br />&nbsp; sized array</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/725056">725056</a></td>
<td>unable to match function definition</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/725189">725189</a></td>
<td>Microsoft C++ compiler crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/725876">725876</a></td>
<td>decltype deduces wrong type</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/729345">729345</a></td>
<td>Rvalue reference overloading rules</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/732006">732006</a></td>
<td>auto -&gt; decltype causes C1001 crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/736295">736295</a></td>
<td>fatal error C1001 when using Lambda Expression</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/736576">736576</a></td>
<td>Incorrect name lookup in a lambda expression defined inside a class<br />&nbsp; member function</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/736931">736931</a></td>
<td>The explicit capture of an entity by a nested lambda-expression does not<br />&nbsp; cause its implicit capture by the containing lambda-expression.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/736965">736965</a></td>
<td>internal compiler error instead of compiler diagnostic</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/711056">711056</a></td>
<td>Friend Template Classes and Lambda Functions</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/741267">741267</a></td>
<td>Visual Studio 2010 C++: Static objects imported via using directives in<br />&nbsp; lambdas cause compilation issues!</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/743303">743303</a></td>
<td>Initializer list in a lambda crashes</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/746042">746042</a></td>
<td>It does not work to instantiate a template with two different anonymous<br />&nbsp; enums</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/746056">746056</a></td>
<td>Error C1001 with range-based for-loop containing complex expression</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/746135">746135</a></td>
<td>lambda expression problem</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/746680">746680</a></td>
<td>Internal Compiler error (C1001) and sometimes crash with VS2012</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/747514">747514</a></td>
<td>Inconsistent behavior when passing rvalue reference to function vs.<br />&nbsp; function pointer</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/748530">748530</a></td>
<td>Function pointer to templated function becomes that of non-templated<br />&nbsp; function of the same name</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/750224">750224</a></td>
<td>Visual Studio 2010, compiler crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/751729">751729</a></td>
<td>range-based for and shared_ptr internal error</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/752136">752136</a></td>
<td>Array&lt;&gt; deallocated too early</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/753113">753113</a></td>
<td>VS2012 C++ Compiler Crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/753699">753699</a></td>
<td>C++ compiler crashes instead of returning error for simple erroneous C++<br />&nbsp; code</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/753981">753981</a></td>
<td>Errors C2950 and C3416 are the same and shouldn't be errors at the first<br />&nbsp; place.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/754807">754807</a></td>
<td>Possible minor bug in Visual C++ 2010/2012 regarding conditional operator</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/759048">759048</a></td>
<td>Compiler crash on C++ code</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/759235">759235</a></td>
<td>Cannot build project</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/760771">760771</a></td>
<td>fatal error C1001: An internal error has occurred in the compiler.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/761026">761026</a></td>
<td>XMMATRIX not properly aligned when using c++11 auto keyword.</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/761148">761148</a></td>
<td>Internal Compiler Error using const wchar_t* in inline method</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/762838">762838</a></td>
<td>Partial template specialization error with namespace &amp; final</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/770391">770391</a></td>
<td>Uniform Initialization Error with Nov 2012 CTP of Visual C++</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/770526">770526</a></td>
<td>[Codename Milan] Delegating constructors not working with explicit<br />&nbsp; constructors</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/770888">770888</a></td>
<td>const ref to initializer_list is not recognized as valid ctor</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/771018">771018</a></td>
<td>CL crashes when compiel code with initializer_list</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/771272">771272</a></td>
<td>C/C++ Compiler Driver Crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/771311">771311</a></td>
<td>Variadic template bug in vs2012 november CTP</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/771533">771533</a></td>
<td>[Codename Milan] Regression making function operator public with using<br />&nbsp; statement</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/771534">771534</a></td>
<td>[Codename Milan] Regression - Warning 4554 erroneously emitted</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/772001">772001</a></td>
<td>[Codename Milan] C++11 compilation issue (C2065)</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/772093">772093</a></td>
<td>x86 C++ compiler crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/773505">773505</a></td>
<td>std::forward and variadic templates failed in Nov 2012 CTP</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774153">774153</a></td>
<td>[Codename Milan] Missing &lt;initializer_list&gt; include causes compiler<br />&nbsp; crash</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774268">774268</a></td>
<td>Failure to bind rvalue to a constant reference when rvalue is returned<br />&nbsp; from virtual function</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774456">774456</a></td>
<td>[Codename Milan] ambiguous begin()/end() of initilizer_list</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/774527">774527</a></td>
<td>After upgraded from VS2008, build project in VS2012 shows error: c1xx :<br />&nbsp; fatal error C1083: Cannot open source file: '??????????????????????????????':<br />&nbsp; No such file or directory</td>
</tr>
<tr>
<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/775016">775016</a></td>
<td>[Codename Milan] std::forward ignore namespaces in variadic template<br />&nbsp; functions</td>
</tr>
</tbody>
</table>
<p>These&nbsp;are only a small portion of bugs we have fixed (less than 20% of mine), and there are still large amount of active bugs on which we are working.</p>
<p>If you find any bugs in the compiler, feel free to report&nbsp;them through&nbsp;<a href="https://connect.microsoft.com/VisualStudio">Microsoft Connect</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>November CTP of Visual C++ compiler, more C++11 features</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/november-ctp-of-visual-c-compiler-more-c11-features</link>
      <pubDate>Sat, 03 Nov 2012 16:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2012/11/03/november-ctp-of-visual-c-compiler-more-c11-features/</guid>
      <description><![CDATA[Our team announced Novemeber CTP of Visual C++ compiler.
It contains the following...]]></description>
      <content:encoded><![CDATA[<p>Our team announced <a href="https://blogs.msdn.com/b/vcblog/archive/2012/11/02/visual-c-c-11-and-the-future-of-c.aspx">Novemeber CTP of Visual C++ compiler</a>.</p>
<p>It contains the following C++11&nbsp;features besides those already in VS2012:</p>
<ul>
<li>Variadic templates</li>
<li>Uniform initialization and initializer_lists</li>
<li>Delegating constructors</li>
<li>Raw string literals</li>
<li>Explicit conversion operators</li>
<li>Default template arguments for function templates</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>System.Uri doesn’t allow trailing dot</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/system-uri-doesnt-allow-trailing-dot</link>
      <pubDate>Mon, 06 Feb 2012 22:19:58 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2012/02/06/system-uri-doesnt-allow-trailing-dot/</guid>
      <description><![CDATA[Again, System.Uri tries to be smart and does something on my behalf :-(
This time, the victim is...]]></description>
      <content:encoded><![CDATA[<p>Again, System.Uri tries to be smart and does something on my behalf :-(</p>
<p>This time, the victim is trailing dot (which is common in wiki pages). See this connect <a title="bug" href="https://connect.microsoft.com/VisualStudio/feedback/details/386695/">bug</a> for details.</p>
<p>The workaround is similar to the one described in this <a title="post" href="https://blogs.msdn.com/b/xiangfan/archive/2012/01/15/system-uri-doesn-t-allow-embedded-escaped-slashes.aspx">post</a>. The only difference is that we need 'GenericUriParserOptions.DontCompressPath' instead.</p>]]></content:encoded>
    </item>
    <item>
      <title>C++: Under the Hood</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/c-under-the-hood</link>
      <pubDate>Mon, 06 Feb 2012 19:32:26 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2012/02/06/c-under-the-hood/</guid>
      <description><![CDATA[This is an article written by Jan Gray. It is quite old, but most of the contents still apply today....]]></description>
      <content:encoded><![CDATA[<p>This is an article written by Jan Gray. It is quite old, but most of the contents still apply today.</p>  <p>The original article on MSDN can no longer be found. Here is the pdf version on OpenRCE: <a title="https://www.openrce.org/articles/files/jangrayhood.pdf" href="https://www.openrce.org/articles/files/jangrayhood.pdf">https://www.openrce.org/articles/files/jangrayhood.pdf</a>.</p>  <p>Overview:</p>  <p>How are classes laid out?    <br />How are data members accessed?     <br />How are member functions called?     <br />What is an adjuster thunk?     <br />What are the costs:     <br />&#160;&#160;&#160; Of single, multiple, and virtual inheritance?     <br />&#160;&#160;&#160; Of virtual functions and virtual function calls?     <br />&#160;&#160;&#160; Of casts to bases, to virtual bases?     <br />&#160;&#160;&#160; Of exception handling?</p>]]></content:encoded>
    </item>
    <item>
      <title>C++98 -&gt; C++11: Pass by value or pass by reference?</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/c98-c11-pass-by-value-or-pass-by-reference</link>
      <pubDate>Fri, 03 Feb 2012 19:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2012/02/03/c98-c11-pass-by-value-or-pass-by-reference/</guid>
      <description><![CDATA[In GoingNative 2012, there are some discussions on the new coding style for C++11. One interesting...]]></description>
      <content:encoded><![CDATA[<p>In <a href="https://channel9.msdn.com/Events/GoingNative/GoingNative-2012" target="_blank">GoingNative 2012</a>, 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.</p>
<p>In C++98, pass by reference is in general more efficient because it saves extra copies (if the copy is expensive, otherwise the extra indirection may hurt the perf instead). However, after the introduction of move semantics in C++11, the story is now a little different (Note that premature optimization doesn&rsquo;t buy you anything, so the following is to give you a full picture of the new thought introduced in C++11, see the guidelines at the end and use it when appropriate)</p>
<p>Let&rsquo;s see the following example: <br /> <br /><span style="color: #0000ff;">#include</span>&nbsp;<span style="color: #a31515;">&lt;iostream&gt;</span> <br /><span style="color: #0000ff;">#include</span>&nbsp;<span style="color: #a31515;">&lt;vector&gt;</span> <br /> <br /><span style="color: #0000ff;">using</span>&nbsp;<span style="color: #0000ff;">namespace</span> std; <br /> <br /><span style="color: #0000ff;">struct</span> String { <br />&nbsp;&nbsp;&nbsp; String(<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #0000ff;">wchar_t</span> *) { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; <span style="color: #a31515;">"ctor"</span> &lt;&lt; endl; <br />&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp; String(<span style="color: #0000ff;">const</span> String &amp;) { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; <span style="color: #a31515;">"copy ctor"</span> &lt;&lt; endl; <br />&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp; String(String &amp;&amp;) { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; <span style="color: #a31515;">"move ctor"</span> &lt;&lt; endl; <br />&nbsp;&nbsp;&nbsp; } <br />}; <br /> <br /><span style="color: #0000ff;">void</span> f1(String s) { <br />&nbsp;&nbsp;&nbsp; vector&lt;String&gt; v; <br />&nbsp;&nbsp;&nbsp; v.push_back(std::move(s)); <br />} <br /><span style="color: #0000ff;">void</span> f2(<span style="color: #0000ff;">const</span> String &amp;s) { <br />&nbsp;&nbsp;&nbsp; vector&lt;String&gt; v; <br />&nbsp;&nbsp;&nbsp; v.push_back(s); <br />} <br /> <br /><span style="color: #0000ff;">void</span> g() { <br />&nbsp;&nbsp;&nbsp; String s(L<span style="color: #a31515;">""</span>); <br />&nbsp;&nbsp;&nbsp; cout &lt;&lt; <span style="color: #a31515;">"f1(s)"</span> &lt;&lt; endl; <br />&nbsp;&nbsp;&nbsp; f1(s); <br />&nbsp;&nbsp;&nbsp; cout &lt;&lt; <span style="color: #a31515;">"f1(L"")"</span> &lt;&lt; endl; <br />&nbsp;&nbsp;&nbsp; f1(L<span style="color: #a31515;">""</span>); <br />&nbsp;&nbsp;&nbsp; cout &lt;&lt; <span style="color: #a31515;">"f2(s)"</span> &lt;&lt; endl; <br />&nbsp;&nbsp;&nbsp; f2(s); <br />&nbsp;&nbsp;&nbsp; cout &lt;&lt; <span style="color: #a31515;">"f2(L"")"</span> &lt;&lt; endl; <br />&nbsp;&nbsp;&nbsp; f2(L<span style="color: #a31515;">""</span>); <br />}</p>
<p>If you run the code, you will find that 'f1' has one less copy ctor call for rvalue argument and the same&nbsp; amount of copy ctor call for lvalue argument than 'f2', which means 'f1' is more efficient (assume that move ctor is much cheaper than copy ctor).</p>
<p>The trick is as follows: for lvalue argument, 'f1' has one extra copy to pass the argument because it is by-value, while 'f2' has one extra copy to call push_back. So no difference; for rvalue argument, the compiler has to create a temporary 'String(L&ldquo;&rdquo;)' and pass the temporary to 'f1' or 'f2' anyway. Because 'f1' can take advantage of move ctor when the argument is a temporary (which is an rvalue), the costs to pass the argument are the same now for 'f1' and 'f2'.</p>
<p>This means in C++11 we can get better performance by using pass-by-value approach when:</p>
<ol>
<li>The parameter type supports move semantics.</li>
<li>The cost of move constructor is much cheaper than the copy constructor (both the time and stack usage).</li>
<li>Inside the function, the parameter type will be passed to another function or operation which supports both copy and move.</li>
<li>It is common to pass a temporary as the argument.</li>
</ol>
<p><strong>Update1<br /></strong></p>
<p>I learn today (April 2nd, 2013) that 'return m;' is in general more efficient than 'return std::move(m);'. Both will use move constructor of Matrix, but the latter inhibits <a href="https://en.wikipedia.org/wiki/NRVO">NRVO</a> (which means the compiler can't eliminate&nbsp;the call to the move constructor).</p>
<p>They are&nbsp;the same in the above example because&nbsp;'operator-' returns function parameter. If you return a local variable instead of a function parameter, you can save one call to the move constructor.</p>
<p>The criteria for copy / move constructor elision is in C++11 standard draft <a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3485.pdf">n3485.pdf</a>, 12.8 / 31:</p>
<p>&nbsp;&nbsp;&nbsp; in a return statement in a function with a class return type, <strong>when the expression is the name of a non-volatile automatic object</strong> (other than a function or catch-clause parameter) with the same cv-unqualified type as the function return type, the copy/move operation can be omitted by constructing the automatic object directly into the function&rsquo;s return value</p>
<p>The complex two-stage overload resolution to choose move constructor when you return an lvalue object is in 12.8 / 32:</p>
<p>&nbsp;&nbsp;&nbsp; <strong>When the criteria for elision of a copy operation are met or would be met save for the fact that the source object is a function parameter</strong>, and the object to be copied is designated by an lvalue, overload resolution to select the constructor for the copy is first performed as if the object were designated by an rvalue. If overload resolution fails, or if the type of the first parameter of the selected constructor is not an rvalue reference to the object&rsquo;s type (possibly cv-qualified), overload resolution is performed again, considering the object as an lvalue. [ Note: This two-stage overload resolution must be performed regardless of whether copy elision will occur. It determines the constructor&nbsp;to be called if elision is not performed, and the selected constructor must be accessible even if the call is elided. &mdash;end note ]</p>
<p><strong>Update2</strong></p>
<p>Here is an example to explain the rules.<br /> <br /> <span style="color: #2b91af;">Matrix</span>&nbsp;Add(<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #2b91af;">Matrix</span>&nbsp;&amp;<span style="color: #808080;">m1</span>,&nbsp;<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #2b91af;">Matrix</span>&nbsp;&amp;<span style="color: #808080;">m2</span>)<br /> {<br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af;">Matrix</span>&nbsp;m;<br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #008000;">//&nbsp;Calculate&nbsp;m</span><br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff;">return</span>&nbsp;m;<br /> }<br style="color: #0000ff;" /> <span style="color: #2b91af;">Matrix</span>&nbsp;NegateByRef(<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #2b91af;">Matrix</span>&nbsp;&amp;<span style="color: #808080;">m</span>)<br /> {<br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #008000;">//&nbsp;Calculate&nbsp;m&nbsp;</span><br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff;">return</span>&nbsp;<span style="color: #808080;">m</span>;<br /> }<br style="color: #0000ff;" /> <span style="color: #2b91af;">Matrix</span>&nbsp;NegateByValue(<span style="color: #2b91af;">Matrix</span>&nbsp;<span style="color: #808080;">m</span>)<br /> {<br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #008000;">//&nbsp;Calculate&nbsp;m&nbsp;</span><br /> &nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff;">return</span>&nbsp;<span style="color: #808080;">m</span>;<br />}<br /><span style="color: #2b91af;"><span style="color: #0000ff;">void</span></span> NoOpByRef(<span style="color: #0000ff;">const</span>&nbsp;<span style="color: #2b91af;">Matrix</span>&nbsp;&amp;<span style="color: #808080;">m</span>)<br /> {<br /> }<br style="color: #0000ff;" /> <span style="color: #2b91af;"><span style="color: #0000ff;">void</span></span> NoOpByValue(<span style="color: #2b91af;">Matrix</span>&nbsp;<span style="color: #808080;">m</span>)<br /> {<br />}</p>
<p>The following two tables show how many copy ctor (number before the comma) and move ctor (number after the comma) are called in each scenario.<br />For each scenario, the row is the function we call, the column is the argument to the function. For example, row 'NegateByRef' and column 'm' means 'NegateByRef(m)'.<br />m, m1 and m2 are known matrices.</p>
<table style="width: 544px;" border="1" cellspacing="0" cellpadding="0"><colgroup><col width="226" /> <col width="47" /> <col width="124" /> </colgroup>
<tbody>
<tr>
<td width="226" height="19">Matrix has move ctor</td>
<td width="47">m</td>
<td width="124">Add(m1,m2)</td>
</tr>
<tr>
<td height="19">NegateByRef</td>
<td>1,0</td>
<td>1,1</td>
</tr>
<tr>
<td height="19">NegateByValue</td>
<td>1,1</td>
<td>0,2</td>
</tr>
<tr>
<td height="19">NoOpByRef</td>
<td>0,0</td>
<td>0,1</td>
</tr>
<tr>
<td height="19">NoOpByValue</td>
<td>1,0</td>
<td>0,1</td>
</tr>
</tbody>
</table>
<table style="width: 544px;" border="1" cellspacing="0" cellpadding="0"><colgroup><col width="226" /> <col width="47" /> <col width="124" /> </colgroup>
<tbody>
<tr>
<td width="226" height="19">Matrix doesn't have move ctor</td>
<td width="47">m</td>
<td width="124">Add(m1,m2)</td>
</tr>
<tr>
<td height="19">NegateByRef</td>
<td>1,0</td>
<td>2,0</td>
</tr>
<tr>
<td height="19">NegateByValue</td>
<td>2,0</td>
<td>2,0</td>
</tr>
<tr>
<td height="19">NoOpByRef</td>
<td>0,0</td>
<td>1,0</td>
</tr>
<tr>
<td height="19">NoOpByValue</td>
<td>1,0</td>
<td>1,0</td>
</tr>
</tbody>
</table>
<ol>
<li>Rule 1 is the basis of our discussion and we assume that it is always true.</li>
<li>From the two tables, you can find that the total numbers of move + copy ctor are the same in each scenario. So if rule 2 is true, it is always better to add a move ctor to the type.</li>
<li>You can find that 'NoOpByValue' is always worse than 'NoOpByRef'. This is related to rule3. Note that, rule 3 may be true even if the parameter is read only. That is, whether you modify 'm' in 'Negate' doesn't have impact on the number of ctor called. It is only related to whether you pass the parameter further. In this case, 'return m;' is the operation which supports both copy and move.</li>
<li>'Add' returns rvalue (temporary is an rvalue) and 'm' is an lvalue. You can find that 'NegateByValue' is only better than 'NegateByRef' when rule 4 (the argument is an rvalue) is true.</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>System.Uri doesn’t allow embedded escaped slashes</title>
      <link>https://docs.microsoft.com/archive/blogs/xiangfan/system-uri-doesnt-allow-embedded-escaped-slashes</link>
      <pubDate>Sun, 15 Jan 2012 11:05:27 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Fan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/xiangfan/2012/01/15/system-uri-doesnt-allow-embedded-escaped-slashes/</guid>
      <description><![CDATA[I use C# a lot to write small utilities and sometimes find that it is annoying to have to dig into...]]></description>
      <content:encoded><![CDATA[<p>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 <a href="https://blogs.msdn.com/b/xiangfan/archive/2008/09/01/magic-behind-valuetype-equals.aspx" target="_blank">occurence</a> of such experience).</p>  <p><a href="https://developer.linkedin.com/documents/connections-api" target="_blank">LinkedIn API</a> allows you to get the details of user’s connection using url like the following:</p>  <blockquote>   <p>https://api.linkedin.com/v1/people/url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Flbeebe/connections</p> </blockquote>  <p>However, if you create a url like the above in C# and send the request to LinkedIn, the server will reject the request and complain about the wrong signature.</p>  <p>I hit this kind of issue several times before (due to slightly different escaping rules between the requirement of <a href="https://tools.ietf.org/html/rfc5849" target="_blank">oAuth 1.0</a> 3.6 / 2 (<a href="https://tools.ietf.org/html/rfc3986" target="_blank">RFC3986</a>) and <a href="https://msdn.microsoft.com/en-US/library/system.uri.escapeuristring.aspx" target="_blank">Uri.EscapeUriString</a> in .Net 2.0 (<a href="https://tools.ietf.org/html/rfc2396" target="_blank">RFC2396</a>)). But this time, the root cause is different.</p>  <p>After spending lots of time debugging by myself and searching the web later, I reached the following post: <a title="https://connect.microsoft.com/VisualStudio/feedback/details/94109/" href="https://connect.microsoft.com/VisualStudio/feedback/details/94109/">https://connect.microsoft.com/VisualStudio/feedback/details/94109/</a></p>  <p>So it is clear that .Net framework explicitly alters the input url for ‘security’ reason. But it doesn’t expose the interface to allow the user to change this behavior (even if it is simply a parser flag called ‘GenericUriParserOptions.DontUnescapePathDotsAndSlashes’ which can be set internally).</p>  <p>Well, I’m on my own to hack it. The workaround posted in the bug changes the parser flag for all Uri objects with the same url scheme, so I have to write a more isolated version:</p>&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">public</span>&#160;<span style="color: rgb(0,0,255)">static</span>&#160;<span style="color: rgb(0,0,255)">class</span>&#160;<span style="color: rgb(43,145,175)">HackedUri</span>   <br />&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">private</span>&#160;<span style="color: rgb(0,0,255)">const</span>&#160;<span style="color: rgb(43,145,175)">GenericUriParserOptions</span> c_Options =   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">GenericUriParserOptions</span>.Default |   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">GenericUriParserOptions</span>.DontUnescapePathDotsAndSlashes |   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">GenericUriParserOptions</span>.Idn |   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">GenericUriParserOptions</span>.IriParsing;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">private</span>&#160;<span style="color: rgb(0,0,255)">static</span>&#160;<span style="color: rgb(0,0,255)">readonly</span>&#160;<span style="color: rgb(43,145,175)">GenericUriParser</span> s_SyntaxHttp = <span style="color: rgb(0,0,255)">new</span>&#160;<span style="color: rgb(43,145,175)">GenericUriParser</span>(c_Options);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">private</span>&#160;<span style="color: rgb(0,0,255)">static</span>&#160;<span style="color: rgb(0,0,255)">readonly</span>&#160;<span style="color: rgb(43,145,175)">GenericUriParser</span> s_SyntaxHttps = <span style="color: rgb(0,0,255)">new</span>&#160;<span style="color: rgb(43,145,175)">GenericUriParser</span>(c_Options);   <br />  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">static</span> HackedUri()   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,128,0)">// Initialize the scheme</span>   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">FieldInfo</span> fieldInfoSchemeName = <span style="color: rgb(0,0,255)">typeof</span>(<span style="color: rgb(43,145,175)">UriParser</span>).GetField(<span style="color: rgb(163,21,21)">&quot;m_Scheme&quot;</span>, <span style="color: rgb(43,145,175)">BindingFlags</span>.Instance | <span style="color: rgb(43,145,175)">BindingFlags</span>.NonPublic);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">if</span> (fieldInfoSchemeName == <span style="color: rgb(0,0,255)">null</span>)   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">throw</span>&#160;<span style="color: rgb(0,0,255)">new</span>&#160;<span style="color: rgb(43,145,175)">MissingFieldException</span>(<span style="color: rgb(163,21,21)">&quot;'m_Scheme' field not found&quot;</span>);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fieldInfoSchemeName.SetValue(s_SyntaxHttp, <span style="color: rgb(163,21,21)">&quot;http&quot;</span>);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fieldInfoSchemeName.SetValue(s_SyntaxHttps, <span style="color: rgb(163,21,21)">&quot;https&quot;</span>);   <br />  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">FieldInfo</span> fieldInfoPort = <span style="color: rgb(0,0,255)">typeof</span>(<span style="color: rgb(43,145,175)">UriParser</span>).GetField(<span style="color: rgb(163,21,21)">&quot;m_Port&quot;</span>, <span style="color: rgb(43,145,175)">BindingFlags</span>.Instance | <span style="color: rgb(43,145,175)">BindingFlags</span>.NonPublic);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">if</span> (fieldInfoPort == <span style="color: rgb(0,0,255)">null</span>)   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">throw</span>&#160;<span style="color: rgb(0,0,255)">new</span>&#160;<span style="color: rgb(43,145,175)">MissingFieldException</span>(<span style="color: rgb(163,21,21)">&quot;'m_Port' field not found&quot;</span>);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fieldInfoPort.SetValue(s_SyntaxHttp, 80);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fieldInfoPort.SetValue(s_SyntaxHttps, 443);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">public</span>&#160;<span style="color: rgb(0,0,255)">static</span>&#160;<span style="color: rgb(43,145,175)">Uri</span> Create(<span style="color: rgb(0,0,255)">string</span> url)   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">Uri</span> result = <span style="color: rgb(0,0,255)">new</span>&#160;<span style="color: rgb(43,145,175)">Uri</span>(url);   <br />  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">if</span> (url.IndexOf(<span style="color: rgb(163,21,21)">&quot;%2F&quot;</span>, <span style="color: rgb(43,145,175)">StringComparison</span>.OrdinalIgnoreCase) != -1)   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">UriParser</span> parser = <span style="color: rgb(0,0,255)">null</span>;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">switch</span> (result.Scheme.ToLowerInvariant())   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">case</span>&#160;<span style="color: rgb(163,21,21)">&quot;http&quot;</span>:   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; parser = s_SyntaxHttp;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">break</span>;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">case</span>&#160;<span style="color: rgb(163,21,21)">&quot;https&quot;</span>:   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; parser = s_SyntaxHttps;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">break</span>;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">if</span> (parser != <span style="color: rgb(0,0,255)">null</span>)   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,128,0)">// Associate the parser</span>   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(43,145,175)">FieldInfo</span> fieldInfo = <span style="color: rgb(0,0,255)">typeof</span>(<span style="color: rgb(43,145,175)">Uri</span>).GetField(<span style="color: rgb(163,21,21)">&quot;m_Syntax&quot;</span>, <span style="color: rgb(43,145,175)">BindingFlags</span>.Instance | <span style="color: rgb(43,145,175)">BindingFlags</span>.NonPublic);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">if</span> (fieldInfo == <span style="color: rgb(0,0,255)">null</span>)   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">throw</span>&#160;<span style="color: rgb(0,0,255)">new</span>&#160;<span style="color: rgb(43,145,175)">MissingFieldException</span>(<span style="color: rgb(163,21,21)">&quot;'m_Syntax' field not found&quot;</span>);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fieldInfo.SetValue(result, parser);   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: rgb(0,0,255)">return</span> result;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }   <br />&#160;&#160;&#160; }   <br />  <br />  <p>However, I feel guilty for hacking.</p>]]></content:encoded>
    </item>
  </channel>
</rss>