Error when using atomic pointer to const - by BartoszMilewski

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.


1
0
Sign in
to vote
ID 809351 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/21/2013 5:46:45 PM
Access Restriction Public

Description

I define an atomic pointer to const bool:

std::atomic<bool const *>  a;

I try to store the address of a global bool:

bool i = true;
a.store(&i);

and get an error inside xxatomic about conversion from const bool * to void*. The same code compiles when const is removed:


std::atomic<bool *>  a;

Sign in to post a comment.
Posted by Microsoft on 3/17/2014 at 4:36 PM
Hi,

Thanks for reporting this bug. We've fixed it, and the fix will be available in the next major version of VC (i.e. after 2013).

I've added a test to verify that all member functions of atomic<T *> and atomic<const T *> (including constructors) compile.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
stl@microsoft.com
Posted by Microsoft on 11/22/2013 at 2:23 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 11/22/2013 at 1:45 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 11/21/2013 at 5:54 PM
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)