C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Function overload set type information loss

From: organicoman <organicoman_at_[hidden]>
Date: Fri, 02 Aug 2024 19:05:12 +0400
And you compare your proposal to C++ reflection or "other reflections"?And is not "proposal", it very coles to be standard:https://herbsutter.com/2024/07/02/trip-report-summer-iso-c-standards-meeting-st-louis-mo-usa/Beside there is available for long time in experimental branch:https://godbolt.org/z/zW9aMx8qM```constexpr auto r = ^int;typename[:r:] x = 42; // Same as: int x = 42;typename[:^char:] c = '*'; // Same as: char c = '*';int main(){}```Did you read this paper at least once? Or is this too much to ask you?To be totally honest with you... it is too much asked. Because i need to get used to concepts, coroutines, executors, TS papers......etcWhen i say understand, that means master.None of which i use in my daily job.And I'm not an avid "new feature" consumer, if what i have is sufficient.Probably you are right, maybe i need to update gradually.As I show here, it is near mature enough for many use cases.Since you said it... I trust you.here:```for (auto& f : vec) f();```Is same as yours:> for(const auto& f : vec)> {> cout << "function parameterized on t = " << /*some call to get the non-type template value*/ << endl;>> cout << "ret val =" << f(10) << endl;> }Simply the whole loop body is hidden in the `Handle` helper.Show me real life problems that can't be handled like this.Please read the bottom of that post not it's top.

Received on 2024-08-02 15:05:21