<div dir="ltr">4.0.1 it is. Thanks Hans!<div><br></div><div>/Eric</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 1, 2017 at 10:08 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We're at the "should have tagged 'final' days ago" stage :-)<br>
<br>
Since it's not a regression, I would prefer not to merge it unless you<br>
feel super strongly about it.<br>
<br>
Sounds like a good candidate for 4.0.1 (tracking bug is PR32061).<br>
<br>
Thanks,<br>
Hans<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Mar 1, 2017 at 1:36 AM, Eric Fiselier <<a href="mailto:eric@efcs.ca">eric@efcs.ca</a>> wrote:<br>
> @Hans Where are we in the release process? I would like to merge this into<br>
> 4.0.<br>
><br>
> Although it's not a regression, it is a significant bug. This patch fixes<br>
> the bug by<br>
> forwarding to a compiler builtin, which is strictly better than what we<br>
> have. I'm<br>
> confident this patch is safe.<br>
><br>
> /Eric<br>
><br>
> On Tue, Feb 28, 2017 at 6:27 PM, Eric Fiselier via cfe-commits<br>
> <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> Author: ericwf<br>
>> Date: Tue Feb 28 19:27:14 2017<br>
>> New Revision: 296561<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=296561&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=296561&view=rev</a><br>
>> Log:<br>
>> Fix PR32097 - is_abstract doesn't work on class templates.<br>
>><br>
>> This patch fixes <a href="http://llvm.org/PR32097" rel="noreferrer" target="_blank">llvm.org/PR32097</a> by using the __is_abstract<br>
>> builtin type-trait instead of the previous library-only implementation.<br>
>><br>
>> All supported compilers provide this trait. I've tested as far<br>
>> back as Clang 3.2, GCC 4.6 and MSVC trunk.<br>
>><br>
>> Modified:<br>
>> libcxx/trunk/include/type_<wbr>traits<br>
>><br>
>> libcxx/trunk/test/std/<wbr>utilities/meta/meta.unary/<wbr>meta.unary.prop/is_abstract.<wbr>pass.cpp<br>
>><br>
>> Modified: libcxx/trunk/include/type_<wbr>traits<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=296561&r1=296560&r2=296561&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/include/<wbr>type_traits?rev=296561&r1=<wbr>296560&r2=296561&view=diff</a><br>
>><br>
>> ==============================<wbr>==============================<wbr>==================<br>
>> --- libcxx/trunk/include/type_<wbr>traits (original)<br>
>> +++ libcxx/trunk/include/type_<wbr>traits Tue Feb 28 19:27:14 2017<br>
>> @@ -1297,18 +1297,8 @@ template <class _Tp> using decay_t = typ<br>
>><br>
>> // is_abstract<br>
>><br>
>> -namespace __is_abstract_imp<br>
>> -{<br>
>> -template <class _Tp> char __test(_Tp (*)[1]);<br>
>> -template <class _Tp> __two __test(...);<br>
>> -}<br>
>> -<br>
>> -template <class _Tp, bool = is_class<_Tp>::value><br>
>> -struct __libcpp_abstract : public integral_constant<bool,<br>
>> sizeof(__is_abstract_imp::__<wbr>test<_Tp>(0)) != 1> {};<br>
>> -<br>
>> -template <class _Tp> struct __libcpp_abstract<_Tp, false> : public<br>
>> false_type {};<br>
>> -<br>
>> -template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract : public<br>
>> __libcpp_abstract<_Tp> {};<br>
>> +template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract<br>
>> + : public integral_constant<bool, __is_abstract(_Tp)> {};<br>
>><br>
>> #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_<wbr>VARIABLE_TEMPLATES)<br>
>> template <class _Tp> _LIBCPP_CONSTEXPR bool is_abstract_v<br>
>><br>
>> Modified:<br>
>> libcxx/trunk/test/std/<wbr>utilities/meta/meta.unary/<wbr>meta.unary.prop/is_abstract.<wbr>pass.cpp<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp?rev=296561&r1=296560&r2=296561&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/test/std/<wbr>utilities/meta/meta.unary/<wbr>meta.unary.prop/is_abstract.<wbr>pass.cpp?rev=296561&r1=296560&<wbr>r2=296561&view=diff</a><br>
>><br>
>> ==============================<wbr>==============================<wbr>==================<br>
>> ---<br>
>> libcxx/trunk/test/std/<wbr>utilities/meta/meta.unary/<wbr>meta.unary.prop/is_abstract.<wbr>pass.cpp<br>
>> (original)<br>
>> +++<br>
>> libcxx/trunk/test/std/<wbr>utilities/meta/meta.unary/<wbr>meta.unary.prop/is_abstract.<wbr>pass.cpp<br>
>> Tue Feb 28 19:27:14 2017<br>
>> @@ -65,6 +65,14 @@ class Abstract<br>
>> virtual ~Abstract() = 0;<br>
>> };<br>
>><br>
>> +template <class><br>
>> +struct AbstractTemplate {<br>
>> + virtual void test() = 0;<br>
>> +};<br>
>> +<br>
>> +template <><br>
>> +struct AbstractTemplate<double> {};<br>
>> +<br>
>> int main()<br>
>> {<br>
>> test_is_not_abstract<void>();<br>
>> @@ -81,4 +89,6 @@ int main()<br>
>> test_is_not_abstract<NotEmpty><wbr>();<br>
>><br>
>> test_is_abstract<Abstract>();<br>
>> + test_is_abstract<<wbr>AbstractTemplate<int> >();<br>
>> + test_is_not_abstract<<wbr>AbstractTemplate<double> >();<br>
>> }<br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> cfe-commits mailing list<br>
>> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>