zhouyizhou added a comment.

In D133066#3846907 <https://reviews.llvm.org/D133066#3846907>, @aaron.ballman 
wrote:

> In D133066#3845136 <https://reviews.llvm.org/D133066#3845136>, @zhouyizhou 
> wrote:
>
>> After 4 weeks' study, I think the comment didn't need to be changed, sorry 
>> to have bring your so much trouble.
>
> No worries at all, there was no trouble here!

Thank Aaron for your patience and for your encouragement!

>> During this valuable process of studying, I grow up a lot. I learned to read 
>> the C++ standard, and compare the standard to its implementation.
>> In my case, the "user-defined conversion" is the variable "Candidate", the 
>> "second standard conversion sequence" is the object member  
>> "Candidate.FinalConversion".
>> The only pity during my study is that I can't find a example code to let 
>> Clang (even with commit cba72b1f620fd) hit the code below above comment.
>
> I'm glad you found it valuable! As for a code example to hit the code below 
> that comment, the closest I could come is:
>
>   struct S {
>     operator int&& () const { return 12; }
>   };
>   
>   void func(int &&i);
>   
>   int main() {
>     S s;
>     func(s);
>   }
>
> however, that still fails the lvalue-to-rvalue test. I poked at it for a 
> while and I'm not seeing a case where it's possible to hit that condition (it 
> doesn't mean one doesn't exist, just that I didn't have the time to chase it 
> down fully).

Yes! this is the closest example that I can try to hit the code below that 
comment. Yes, I can't hit that condition both with "commit cba72b1f620fd" (I 
debug her in old debian 6 virtual machine) and clang current. However this is 
still a very fruitful journal for me ;-)

I am going to close this thread after a couple of days.

And thanks again for your time ;-)

Cheers
Zhouyi


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133066/new/

https://reviews.llvm.org/D133066

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to