-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsconfirmedVerified by a second partyVerified by a second partydiverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issueDoes the clang frontend diverge from msvc on this issueregression:18Regression in 18 releaseRegression in 18 release
Description
The following code doesn't compile on Clang 18 and further:
template<typename>
concept Constrained = true;
template <typename T>
class C
{
template<Constrained>
class D;
};
template <typename T>
template <Constrained>
class C<T>::D
{
};
With the following message:
<source>:12:11: error: type constraint differs in template redeclaration
12 | template <Constrained>
| ^
<source>:7:14: note: previous template declaration is here
7 | template<Constrained>
| ^
1 error generated.
It compiles with Clang 17, GCC and MSVC (https://godbolt.org/z/r65o8sPjs).
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsconfirmedVerified by a second partyVerified by a second partydiverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issueDoes the clang frontend diverge from msvc on this issueregression:18Regression in 18 releaseRegression in 18 release
Type
Projects
Status
Done