-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++11clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party
Description
Bugzilla Link | 42348 |
Version | trunk |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @DougGregor,@smilingthax,@zygoloid |
Extended Description
The following code fails to compile with an erroneous error "'Impl' is a private member of 'S'":
template <typename> struct S
{
private:
template <typename> static constexpr auto Impl();
public:
template <typename X> using U = decltype(Impl<X>());
};
template <typename T> template <typename>
constexpr auto S<T>::Impl() { }
using X = S<void>::U<void>;
The above code compiles in gcc et al. Making the following change allows compilation:
template <typename> struct S
{
private:
struct W
{
template <typename> static constexpr auto Impl();
};
public:
template <typename X> using U = decltype(W::template Impl<X>());
};
template <typename T> template <typename>
constexpr auto S<T>::W::Impl()
{ }
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++11clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party