Home Dashboard Directory Help
Search

std::is_scalar<nullptr_t> has incorrect value by Timothy A


Status: 

Closed
 as Fixed Help for as Fixed


2
0
Sign in
to vote
Type: Bug
ID: 740872
Opened: 5/7/2012 1:48:12 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

The C++11 standard requires that nullptr_t is considered a scalar type ($3.9/9), but in Visual Studio is_scalar<nullptr_t>::value returns false. This happens in both VS10 and VS11 beta.
Details
Sign in to post a comment.
Posted by Microsoft on 9/26/2012 at 2:38 PM
Hi,

Thanks for reporting the bug. We've fixed it, and the fix will be available in the next release of our C++ Standard Library implementation.

Note: Connect doesn’t notify me about comments; if you have further questions, please e-mail me.

James McNellis
Visual C++ Libraries
james.mcnellis@microsoft.com
Posted by Microsoft on 6/18/2012 at 3:58 PM
Hi,

Thanks for reporting this bug. I'm Microsoft's maintainer of the STL, and I wanted to let you know that while this bug remains active in our database, it won't be fixed in VC11 RTM (VS 2012 RTM). All bugs are important to us, but some are more severe than others and rise to the top of our priority queue.

I'm copying-and-pasting this response across all of the STL's active Connect bugs, but the following terse comments apply specifically to your bug:

* I agree that is_scalar<nullptr_t> should be true. We'll need to audit the other type traits for their behavior with nullptr_t. Interestingly, there's a defect in the Standard here - 20.9.4.1 [meta.unary.cat]/3 says "For any given type T, exactly one of the primary type categories has a value member that evaluates to true." but while nullptr_t is a fundamental type according to 3.9.1 [basic.fundamental]/10, none of the primary type categories in <type_traits> are applicable to it - so it really needs a primary type category all to itself.

I can't promise when we'll be able to resolve this bug, but we hope to do so as soon as possible (and I'll send another response when that happens) - our first opportunity will be the "out of band" release between VC11 and VC12 that Herb Sutter announced at the GoingNative 2012 conference.

Note: Connect doesn't notify me about comments. If you have any further questions, please E-mail me.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
stl@microsoft.com
Posted by MS-Moderator07 [Feedback Moderator] on 5/7/2012 at 7:09 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by MS-Moderator01 on 5/7/2012 at 5:32 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.