diff options
author | ville <ville@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-06 16:28:59 +0000 |
---|---|---|
committer | ville <ville@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-06 16:28:59 +0000 |
commit | cacfd0fcd48a7a84af18fcd04041cacdd4f71018 (patch) | |
tree | 71c188a4452b7f4784584d882f6fd4725511f290 /libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc | |
parent | 837679bc2df5f04edeab96c8f494c7cbdfe67c9f (diff) | |
download | gcc-cacfd0fcd48a7a84af18fcd04041cacdd4f71018.tar.gz |
Support allocators in tuples of zero size.
* include/std/tuple (tuple<>::tuple(),
tuple<>::tuple(allocator_arg_t, const _Alloc&),
tuple<>::tuple(allocator_arg_t, const _Alloc&, const tuple&)): New.
* testsuite/20_util/tuple/cons/allocators.cc: Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237143 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc')
-rw-r--r-- | libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc index 052b79fcf83..bc45780cb98 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc @@ -162,8 +162,30 @@ void test01() } +void test02() +{ + bool test __attribute__((unused)) = true; + using std::allocator_arg; + using std::tuple; + using std::make_tuple; + + typedef tuple<> test_type; + + MyAlloc a; + + // default construction + test_type t1(allocator_arg, a); + // copy construction + test_type t2(allocator_arg, a, t1); + // move construction + test_type t3(allocator_arg, a, std::move(t1)); + // make_tuple + test_type empty = make_tuple(); +} + int main() { test01(); + test02(); return 0; } |