[patch] libstdc++/69293 Use static assertion for uses-allocator construction
Jonathan Wakely
jwakely@redhat.com
Fri Jan 15 23:12:00 GMT 2016
The PR is actually due to a defect in the standard, which I reported
today. The reporter said we're missing a check for is_constructible<T,
Args..., inner_allocator_type> that would ensure we go to bullet (9.4)
and make the example in the PR ill-formed. I didn't add that check
because it's redundant, we don't need to check is_constructible we can
just try the construction and if it fails the program is ill-formed
anyway.
However, due to the defect in the standard the example in the PR
*should* be ill-formed, but isn't. This patch adds a static assertion
making it ill-formed. It would be ill-formed anyway once the defect is
resolved and we implement the resolution, but with the static
assertion we give a better diagnostic, both for
scoped_allocator_adaptor and for ill-formed uses of allocators with
std::tuple.
Tested powerpc64le-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 5555 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160115/d9edf59b/attachment.bin>
More information about the Libstdc++
mailing list