Skip to content

[clang] Crash in mangleUnqualifiedName #106182

Closed
@gbresearch

Description

@gbresearch

The following code fails with code 139:

template<class Base, template<class...> class S>
inline auto create_unique(auto&&... args) -> std::unique_ptr<Base>
requires(std::derived_from<std::remove_cvref_t<decltype(S{std::forward<decltype(args)>(args)...})>, Base>)
{
    using Type = std::remove_cvref_t<decltype(S{std::forward<decltype(args)>(args)...})>;
    return std::make_unique<Type>(std::forward<decltype(args)>(args)...);
}

removing constraint, code compiles. Full demo in Code Explorer,

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions