Skip to content

Conversation

@philnik777
Copy link
Contributor

These aliases are never used, so we can ditch them.

@philnik777 philnik777 marked this pull request as ready for review February 6, 2025 18:28
@philnik777 philnik777 requested a review from a team as a code owner February 6, 2025 18:28
@philnik777 philnik777 merged commit 1117568 into llvm:main Feb 6, 2025
80 checks passed
@philnik777 philnik777 deleted the remove_default_allocator_type branch February 6, 2025 18:28
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 6, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 6, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

These aliases are never used, so we can ditch them.


Full diff: https://github.com/llvm/llvm-project/pull/126066.diff

2 Files Affected:

  • (modified) libcxx/include/__vector/vector.h (-3)
  • (modified) libcxx/include/string (-3)
diff --git a/libcxx/include/__vector/vector.h b/libcxx/include/__vector/vector.h
index bad676a56a8e643..244506065db6163 100644
--- a/libcxx/include/__vector/vector.h
+++ b/libcxx/include/__vector/vector.h
@@ -84,9 +84,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Allocator /* = allocator<_Tp> */>
 class _LIBCPP_TEMPLATE_VIS vector {
-private:
-  typedef allocator<_Tp> __default_allocator_type;
-
 public:
   //
   // Types
diff --git a/libcxx/include/string b/libcxx/include/string
index b7f2d1226946392..157402bbc2944fb 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -763,9 +763,6 @@ struct __padding<0> {};
 
 template <class _CharT, class _Traits, class _Allocator>
 class basic_string {
-private:
-  using __default_allocator_type _LIBCPP_NODEBUG = allocator<_CharT>;
-
 public:
   typedef basic_string __self;
   typedef basic_string_view<_CharT, _Traits> __self_view;

Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
These aliases are never used, so we can ditch them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants