[cfe-dev] CLang compiling windows.h from the Windows SDK

Sean Hunt rideau3 at gmail.com
Sun Aug 8 16:18:23 PDT 2010


On 08/08/2010 05:03 PM, Francois Pichet wrote:
> It doesn't matter that static_cast is a template or not.
>
> Cl.exe will even parse this: (as long as IID_PPV_ARGS_Helper is not called)
>
>     template<typename T>  void** IID_PPV_ARGS_Helper(T** pp)
>      {
> 	sdsa fdfdsf df sd fds++ ++ --<  >fdsfd;;;;;<<<>>>
>      }
>
> Any valid C++ token sequence will be accepted during a template
> definition (or is that a declaration?). The way cl.exe works is
> probably to save the template function as a token sequence list and
> defer actual parsing and semantic analysis to instantiation time. In
> our case IUnknown will then be declared.

/me cries



More information about the cfe-dev mailing list