]> git.ipfire.org Git - thirdparty/gcc.git/commit
Use static assertion for uses-allocator construction
authorJonathan Wakely <jwakely@redhat.com>
Fri, 15 Jan 2016 23:12:13 +0000 (23:12 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 15 Jan 2016 23:12:13 +0000 (23:12 +0000)
commitd7c1581c048bbcb391d6cdf0c5327dd91fee5252
tree48f41d9d3552c8ea588cf4deeeb2b8ec755fe005
parent28621a5c0255fc8f31e379df316828c5548680c2
Use static assertion for uses-allocator construction

PR libstdc++/69293
* include/bits/uses_allocator.h (__uses_alloc<true, ...>): Add
static assertion that type is constructible from the arguments.
* testsuite/20_util/scoped_allocator/69293_neg.cc: New.
* testsuite/20_util/uses_allocator/69293_neg.cc: New.
* testsuite/20_util/uses_allocator/cons_neg.cc: Adjust dg-error.

From-SVN: r232457
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/uses_allocator.h
libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc