[PATCH] PR libstdc++/79195 fix make_array type deduction
Jonathan Wakely
jwakely@redhat.com
Wed Feb 1 12:17:00 GMT 2017
On 23/01/17 15:55 +0000, Jonathan Wakely wrote:
>This adds indirection through a class template partial specialization
>so we don't instantiate common_type<_Types...>::type unless we need
>it.
>
> PR libstdc++/79195
> * include/experimental/array (__make_array_elem): New class template
> and partial specialization.
> (__is_reference_wrapper): Move into __make_array_elem specialization.
> (make_array): Use __make_array_elem to determine element type and move
> static assertion into specialization. Qualify std::forward call.
> (to_array): Add exception specifiation.
> * testsuite/experimental/array/make_array.cc: Test argument types
> without a common type.
> * testsuite/experimental/array/neg.cc: Adjust expected error message.
>
>Tested powerpc64le-linux, committed to trunk (because it's only an
>experimental TS feature).
Here's a more conservative fix for the gcc-6-branch. I prefer the
cleanup on trunk, as this version will remove any cv-qualifiers from
_Dest, but it's good enough for the branch IMHO.
Tested x86_64-linux, committed to gcc-6-branch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 3568 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170201/41855ac9/attachment.bin>
More information about the Gcc-patches
mailing list