Skip to content

Backport 26068c6e6032 to release/15.x #59138

@DimitryAndric

Description

@DimitryAndric

This fixes an issue when compiling libc++ with gcc, as described in https://reviews.llvm.org/D135469:

[libc++] <type_traits>: Avoid instantiating a pointer type.

GCC expands the pointer type in this conditional expression even for template types _Up that are not arrays. This raises an error when std::decay<> is used with reference types (as is done in LLVM's sources). Using add_pointer<> causes GCC to only instantiate a pointer type for array types.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions