[PATCH] D152242: [Clang] Allow omitting `typename` in befriended constructors parameters
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 05:40:54 PDT 2023
cor3ntin added inline comments.
================
Comment at: clang/test/CXX/temp/temp.res/p4.cpp:182-183
+ friend X::X(T::type);
+ friend X::X(T::type = (int)(void(*)(typename T::type))(nullptr)); // expected-error {{friend declaration specifying a default argument must be a definition}}
+ friend X::X(T::type = (int)(void(*)(T::type))(nullptr)); // expected-error {{friend declaration specifying a default argument must be a definition}} \
+ // expected-error {{expected expression}}
----------------
aaron.ballman wrote:
> Hmmm, I was expecting a `missing 'typename'` test case, so perhaps add a friend declaration that's a definition instead?
that is not possible for a constructor afaik
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152242/new/
https://reviews.llvm.org/D152242
More information about the cfe-commits
mailing list