Skip to content

libc++-20 removes std::__compressed_pair #2351

@benine203

Description

@benine203

std::__compressed_pair<pointer, allocator_type> __end_cap_;
for instance references this

From libc++-20:

// Historically, libc++ used a type called `__compressed_pair` to reduce storage needs in cases of empty types (e.g. an
// empty allocator in std::vector). We switched to using `[[no_unique_address]]`. However, for ABI compatibility reasons
// we had to add artificial padding in a few places.
//
// This setting disables the addition of such artificial padding, leading to a more optimal
// representation for several types.
#  define _LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING

Failures ensue:

$ clang++ -stdlib=libc++ <...>
.
.
.
build/vcpkg_installed/x64-linux/include/folly/memory/UninitializedMemoryHacks.h:319:8: error: no template named '__compressed_pair' in namespace 'std'
  319 |   std::__compressed_pair<pointer, allocator_type> __end_cap_;
      |   ~~~~~^
1 error generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions