Sent from my Galaxy



You have been the one who wanted to different types with decltype and effective_decltype.

 

Why are you complaining?

The correct answer in your example must be in the following form:

// one plausible mangled name

PFvvE_i  <---  f<int>

PFvvE_d <---  f<double>

the radix PFvvE is the same denoting the same apparent type, and different tags { _i, _d }, to denote the effective type.

Likewise, the type information is not lost. And you can trace back to what you have called.


Anyway, I think we touched everything in this thread, and thanks to you and Tiago i found a corner case, but solved it.

I think it is time to compile some wording and post it here, maybe it will be more clear.


-----Ursprüngliche Nachricht-----
Von: organicoman <organicoman@yahoo.fr>
Gesendet: Mi 31.07.2024 10:50
Betreff: Re: [std-proposals] Function overload set type information loss
An: Sebastian Wittmeier via Std-Proposals <std-proposals@lists.isocpp.org>;
CC: Sebastian Wittmeier <wittmeier@projectalpha.org>;
 
 

With function pointers you can achieve something like; in most cases even this is only possible at runtime:

 

 

PFvvE <--| do you see the problem here
PFvvE <--| f<int>,f<double>, yet the same name
Just one function f.
Just one function f.
f<double>
f<int>

In "type theory" that's not correct.
Two entity of different signature must have
different types. Otherwise a many to one
relationship takes place.