Skip to content

type trait builtins __remove_cv[ref] are used unconditionally #99464

Closed
@AndreyG

Description

@AndreyG

After the commit 5535716 by @philnik777 the usages of builtin type traits __remove_cv/__remove_cvref are not guarded by #if __has_builtin(__remove_cv[ref]):

using type _LIBCPP_NODEBUG = __remove_cv(_Tp);

using type _LIBCPP_NODEBUG = __remove_cvref(_Tp);

Note that even the remaining comment is wrong now #endif // __has_builtin(__remove_cv).
#endif // __has_builtin(__remove_cv)

Also note that all other type traits builtins are used only after the check, for instance __add_pointer here:
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidResolved as invalid, i.e. not a buglibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions