diff options
author | Jason Merrill <jason@redhat.com> | 2015-11-14 00:11:34 +0000 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2015-11-14 00:11:34 +0000 |
commit | 1da6b773e737548a7ffbfc950774460433ef9bb8 (patch) | |
tree | e5f2d64459601fae812cfe90245af2831eebedb1 /libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc | |
parent | 4587dbe905c7599512c23af5b55591a06bf829b9 (diff) | |
parent | d77055b11cf7e121d66f2da7dfbc5f63347c7d7f (diff) |
Merge trunk@230365.c++-delayed-folding
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c++-delayed-folding@230367 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc')
-rw-r--r-- | libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc new file mode 100644 index 00000000000..fc8acf16dcd --- /dev/null +++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc @@ -0,0 +1,22 @@ +#include <bits/uses_allocator.h> +#include <vector> +#include <experimental/utility> +#include <memory> + +using std::vector; +using std::allocator; +using std::uses_allocator; + +struct A { + using allocator_type = std::experimental::erased_type; +}; + +void test01() { + static_assert(uses_allocator<vector<int>, allocator<int>>()); + static_assert(uses_allocator<A, allocator<A>>()); +} + +int main() { + test01(); + return 0; +} |