[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Obviate method_finder methods (issue 551780043 by address@hidden)
From: |
dak |
Subject: |
Re: Obviate method_finder methods (issue 551780043 by address@hidden) |
Date: |
Sun, 19 Apr 2020 03:55:52 -0700 |
On 2020/04/19 09:55:03, hahnjo wrote:
> On 2020/04/19 09:39:00, dak wrote:
> >
>
https://codereview.appspot.com/551780043/diff/573720045/lily/include/callback.hh
> > File lily/include/callback.hh (right):
> >
> >
>
https://codereview.appspot.com/551780043/diff/573720045/lily/include/callback.hh#newcode166
> > lily/include/callback.hh:166: typedef typename
> remove_pointer<decltype(strip_mfp
> > (static_cast<T> (nullptr)))>::type type;
> > On 2020/04/19 09:22:44, hahnjo wrote:
> > > I'd consider 'using type = ' instead which is more C++ style
> >
> > I think you overestimate my C++ fu. Can you spell this out?
>
> using type = typename remove_pointer<decltype(strip_mfp
(static_cast<T>
> (nullptr)))>::type;
> to declare the type alias:
https://en.cppreference.com/w/cpp/language/type_alias
I see. Basically squeezing in another piece of syntax where it has no
sensible place in order to have a variant of typedef that also works for
template specialisation of types. Or in other words, more C++ style. I
have the vague impression that the ability to do template specialisation
on typedefs would also be able to solve part of the job here in a more
elegant manner but right now my brain objects to more C++ style. So
I'll confine myself to the change you suggest for now. Will take
probably half the day to get to the next patch as I am also doing some
other reorganisation.
Thanks!
https://codereview.appspot.com/551780043/
- Obviate method_finder methods (issue 551780043 by address@hidden), lemzwerg, 2020/04/19
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), dak, 2020/04/19
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), jonas . hahnfeld, 2020/04/19
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), dak, 2020/04/19
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), jonas . hahnfeld, 2020/04/19
- Re: Obviate method_finder methods (issue 551780043 by address@hidden),
dak <=
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), jonas . hahnfeld, 2020/04/19
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), dak, 2020/04/19
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), nine . fierce . ballads, 2020/04/20
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), dak, 2020/04/20
- Re: Obviate method_finder methods (issue 551780043 by address@hidden), dak, 2020/04/20