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

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 740872 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 5/7/2012 1:48:12 AM
Access Restriction Public


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.
Sign in to post a comment.
Posted by Microsoft on 9/26/2012 at 2:38 PM

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
Posted by Microsoft on 6/18/2012 at 3:58 PM

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 - []/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
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(