On 1/27/2013 11:48 PM, Brian Smith wrote:
Joshua Cranmer wrote:
In bug 732043, I want to add a mozilla::Atomic class
that lets us use C++11 atomics where available and fallback to
compiler intrinsics where C++11 atomics are not implemented
(which amounts to gcc 4.4 and Visual Studio 2010 or earlier).
How far are we from Visual Studio 2012 being the default/minimum compiler?

FWIW, in cases like this, I would rather we just use the C++11 API directly 
even if it means dropping support for common but out-of-date compilers like gcc 
4.4 and VS2010.

I personally prefer an API style where the memory ordering constraints of a variable are part of the type declaration as opposed to an optional parameter on the access methods (which means operator overloading will only ever give you sequentially consistent).
Also, why can't we just implement the C++11 atomic APIs using VS2010's 
intrinsics ourselves, if we know we will need to support VS2010 for a long time?
I have code somewhere that adds a VS2010 intrinsics implementation, but I haven't tested it to see if it compiles on VS2010. It's just not been high-enough priority for me to finish off the patch and push it into the tree.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to