[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 05:24:31 -0700 |
On 2020/04/19 11:03:35, hahnjo wrote:
> On 2020/04/19 10:55:52, dak wrote:
> 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.
>
> Yes, I had the same feeling. However I think that the current solution
works
> because the template arguments are deduced from the function argument.
I don't
> currently see a way to make this work with template <> using type =,
but that
> would certainly be nice (and remove the need of using decltype and
> remove_pointer).
The principal problem is that the trampoline instantiation requires the
member function pointer as a non-type template parameter, and the type
of the non-type template parameter is not known in general. So this
becomes a hen-and-egg problem. Template specialisation could possibly
weasel around it but I am not sure about it. It certainly is suspicious
that the otherwise rather comprehensive <type_traits> relying on such
techniques has nothing in its toolbox for that task.
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, 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), 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