Home Dashboard Directory Help
Search

You got it wrong. Again... by Knowing me knowing you, a-ha


Status: 

Closed
 as Deferred Help for as Deferred


1
0
Sign in
to vote
Type: Bug
ID: 645983
Opened: 2/21/2011 11:54:00 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

This should compile:

template<class IntT, IntT low = IntT(), IntT high = IntT()>
struct X
{
    decltype(low) a;
    decltype(high) b;
    X():a((decltype(a)())),b((decltype(b)()))//THIS LINE SHOULD COMPILE
    {
        cout << typeid(a).name() << '\n';
        cout << typeid(b).name() << '\n';
    }
};
Details
Sign in to post a comment.
Posted by Knowing me knowing you, a-ha on 3/12/2011 at 4:41 AM
Hi Jamie,

You see Jamie the part which I have problem to understand is how is it possible that I've got reply:

"We have tried the code, but we could not get the compile error.
Anything we missed?"

If as you're saying they misread, misunderstood, miscopied or mispasted or mis-anything else the COMPILATION wouldn't be possible, would you agree with me?

There would be a totally different story if I would got reply of not being able to compile it, then yes mis- this or that would explained everything but if they "whoever it was" actually got this code to compile your explanation (I do understand that is very diplomatic etc etc) is absolutely unsatisfactory, weak and illogical.
I'm not going to pursue this issue (yes, it is an issue I have, with how things are dealt with-specially customer side of it).
I just want to let you know that I feel very sorry for the fact that company such as Microsoft employs "whoever it is" - absolutely unprofessional people with very little knowledge of how to approach to customer.

Did they compile this code even if it's impossible to compile it with current VS compiler (even better, they as you suggest not only compiled it but this code could be possible mis-copied or mis-pasted, and still compiled)? - people from circus (for only there such things are possible) are working for/with you, not professional programmers.
Regards
Artur
Posted by Microsoft on 3/11/2011 at 10:43 AM
Whoever was trying to reproduce the bug first probably misread or misunderstood something about the repro, or they could have mis-copied, mis-pasted, etc. We are human and it happens occasionally, but we will always double-check that an issue cannot be reproduced before actually closing it due to that.

Jamie Eckman
Visual C++ Team
Posted by Knowing me knowing you, a-ha on 2/26/2011 at 1:38 AM
Hi, I'm glad that I could help. That's great!
But you know I have to ask this question as I've had few 'unpleasant' experiences with 'Connect'. In view of what you're saying, how is it possible that I've got this reply from someone on your side, I'm saying someone because it isn't signed (this is fourth reply counted from bottom in this thread):

We have tried the code, but we could not get the compile error.
Anything we missed?

How is it possible that whoever it was s/he was able to compile it without getting any error?
Looking forward to here some explanation.
Thanks
Artur
Posted by Microsoft on 2/25/2011 at 5:19 PM
Hello Arthur,

Thank you for reporting this bug. This is a great find, thank you. Some reason, decltype used in base class init list where ctor is being called explicitly is not working. We will consider fixing it in a future release. In the meantime, needless to say you can try using the template argument directly.
template<class IntT, IntT low = IntT(), IntT high = IntT()>
struct X
{
    decltype(low) a;
    decltype(high) b;
    X():a( IntT())),b(( IntT()))//THIS LINE SHOULD COMPILE
    {
    }
};

Thanks,
Ulzii Luvsanbat
Windows C++ Team
Posted by Microsoft on 2/23/2011 at 10:47 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Knowing me knowing you, a-ha on 2/23/2011 at 12:46 AM
Uploaded movie clip and demo project.
Posted by Microsoft on 2/22/2011 at 7:04 PM
Hi Knowing,

We have tried the code, but we could not get the compile error.
Anything we missed?

Thank you
Posted by Knowing me knowing you, a-ha on 2/22/2011 at 2:22 AM
There is no demo project. Just copy and paste this code into new created project and create variable of type X in it. As simple as that.
Posted by Microsoft on 2/22/2011 at 1:21 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

Please submit this information to us within 3 business days. We look forward to hearing from you with this information.

Thanks again for your efforts and we look forward to hearing from you.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 2/22/2011 at 1:07 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
ForMicrosoft.rar 2/23/2011 280 KB
decltype_ForMicrosoft.mp4 2/23/2011 1.01 MB