summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp')
-rw-r--r--libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp
index f09651a81eee..88af53a4eeaa 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp
@@ -30,20 +30,27 @@
// UNSUPPORTED: clang-6
#include <memory>
-#include "test_macros.h"
-int main(int, char**)
-{
- typedef std::allocator<char>::pointer AP; // expected-warning {{'pointer' is deprecated}}
- typedef std::allocator<char>::const_pointer ACP; // expected-warning {{'const_pointer' is deprecated}}
- typedef std::allocator<char>::reference AR; // expected-warning {{'reference' is deprecated}}
- typedef std::allocator<char>::const_reference ACR; // expected-warning {{'const_reference' is deprecated}}
- typedef std::allocator<char>::rebind<int>::other ARO; // expected-warning {{'rebind<int>' is deprecated}}
-
- typedef std::allocator<char const>::pointer AP2; // expected-warning {{'pointer' is deprecated}}
- typedef std::allocator<char const>::const_pointer ACP2; // expected-warning {{'const_pointer' is deprecated}}
- typedef std::allocator<char const>::reference AR2; // expected-warning {{'reference' is deprecated}}
- typedef std::allocator<char const>::const_reference ACR2; // expected-warning {{'const_reference' is deprecated}}
- typedef std::allocator<char const>::rebind<int>::other ARO2; // expected-warning {{'rebind<int>' is deprecated}}
+int main(int, char**) {
+ {
+ typedef std::allocator<char>::pointer Pointer; // expected-warning {{'pointer' is deprecated}}
+ typedef std::allocator<char>::const_pointer ConstPointer; // expected-warning {{'const_pointer' is deprecated}}
+ typedef std::allocator<char>::reference Reference; // expected-warning {{'reference' is deprecated}}
+ typedef std::allocator<char>::const_reference ConstReference; // expected-warning {{'const_reference' is deprecated}}
+ typedef std::allocator<char>::rebind<int>::other Rebind; // expected-warning {{'rebind<int>' is deprecated}}
+ }
+ {
+ typedef std::allocator<char const>::pointer Pointer; // expected-warning {{'pointer' is deprecated}}
+ typedef std::allocator<char const>::const_pointer ConstPointer; // expected-warning {{'const_pointer' is deprecated}}
+ typedef std::allocator<char const>::reference Reference; // expected-warning {{'reference' is deprecated}}
+ typedef std::allocator<char const>::const_reference ConstReference; // expected-warning {{'const_reference' is deprecated}}
+ typedef std::allocator<char const>::rebind<int>::other Rebind; // expected-warning {{'rebind<int>' is deprecated}}
+ }
+ {
+ typedef std::allocator<void>::pointer Pointer; // expected-warning {{'pointer' is deprecated}}
+ typedef std::allocator<void>::const_pointer ConstPointer; // expected-warning {{'const_pointer' is deprecated}}
+ // reference and const_reference are not provided by std::allocator<void>
+ typedef std::allocator<void>::rebind<int>::other Rebind; // expected-warning {{'rebind<int>' is deprecated}}
+ }
return 0;
}