Skip to content

[clang] Bug with constraints when using nested classes and sizeof causing compilation failure of GNU ranges library #93099

@elizabethandrews

Description

@elizabethandrews

Newer versions of the library compile due to a workaround in the library for clang. I think the issue described below is still a bug though.

Short reproducer - https://godbolt.org/z/1qzac3vEj

template<typename T=int>
class bg {
public:
  template <int... h>
      requires (sizeof...(h) > 0) friend class l;
};
template <int... h>
    requires (sizeof...(h) > 0) class l;
void m() { bg v; } 

You need the nested class in a template (https://godbolt.org/z/1qzac3vEj) and sizeof (https://godbolt.org/z/3exhT3ahh) to reproduce this.

It might be related to #61763

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"conceptsC++20 concepts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions