Use static assertion for uses-allocator construction
commit55f2f39deac7bdfa4b0bb47dd91d41edc24f555f
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Jan 2016 23:12:13 +0000 (15 23:12 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Jan 2016 23:12:13 +0000 (15 23:12 +0000)
tree48f41d9d3552c8ea588cf4deeeb2b8ec755fe005
parent27c6dbddcfb57b92a46da643fbf675fc12b14008
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232457 138bc75d-0d04-0410-961f-82ee72b054a4
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 [copied from libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc with 55% similarity]
libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc