<div dir="ltr">On Mon, Jun 24, 2013 at 2:49 AM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Jun 23, 2013 at 11:38 PM, Kim <<a href="mailto:soldoutseashell@gmail.com">soldoutseashell@gmail.com</a>> wrote:<br>

>>What is _S_chk?<br>
><br>
> _S_chk is a member function from a class in alloc_traits.h<br>
><br>
>   template<typename _Alloc, typename _Tp><br>
>     class __alloctr_rebind_helper<br>
>     {<br>
>       template<typename _Alloc2, typename _Tp2><br>
>     static constexpr bool<br>
>            _S_chk(typename _Alloc2::template rebind<_Tp2>::other*)<br>
>     { return true; }<br>
><br>
>       template<typename, typename><br>
>         static constexpr bool<br>
>            _S_chk(...)<br>
>            { return false; }<br>
><br>
>     public:<br>
<div class="im">><br>
>     static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);<br>
</div>>     };<br>
<br>
OK, this is <a href="http://llvm.org/PR15651" target="_blank">llvm.org/PR15651</a>. Essentially, -fdelayed-template-parsing<br>
(which is enabled by default on some Windows targets) is currently<br>
incompatible with constexpr. -fno-delayed-template-parsing will<br>
probably help (if it doesn't cause breakage in other headers). I<br>
wonder if we should stop enabling -fno-delayed-template-parsing by<br>
default on MinGW -- MinGW's gcc presumably doesn't behave that way.</blockquote><div><br></div><div style>We don't enable -fdelayed-template-parsing when targetting mingw.  The original invocation didn't specify an OS, so the triple defaulted to ...-win32.</div>
<div style><br>You should use 'clang --target=i686-pc-mingw32' to get regular template parsing and to match the small struct passing ABI, as well as other things I can't recall.</div></div></div></div>