cpp_weekly icon indicating copy to clipboard operation
cpp_weekly copied to clipboard

Could anybody make a proposal? Thanks.

Open YagaoDirac opened this issue 2 years ago • 1 comments

I was watching https://www.youtube.com/watch?v=PJ-byW33-Hs just now. The auto works for most of the cases except for some intermediate special classes. I don't remember that clearly but I remember I've come up with an idea of something like: [[auto_as]] iterator_ref operator[](int i){/some code/} Then when people call this function and restore the return value in a auto variable, it should look like: auto result = some_object[42]; The type of result should be bool rather than a proxy class. One of the examples is that when index or something with the std::vector, it returns the so-called intermediate proxy class. This is also mentioned in Scott Mayer's book(probably 2014 or 2015 or so). I don't know how to make a proposal and even if I would really do that, it's unlikely to be seen. So, anybody please help. Thanks.

YagaoDirac avatar Jul 17 '22 11:07 YagaoDirac

Yes, anyone can make a proposal. Please update the title to be more specific about the topic you want covered.

lefticus avatar Aug 10 '22 15:08 lefticus