diff options
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; +} |