Implement folly::launder for MSVC
authorAndrew Krieger <andrew.krieger@oculus.com>
Tue, 29 Aug 2017 05:30:39 +0000 (22:30 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 29 Aug 2017 05:38:50 +0000 (22:38 -0700)
commitb3aabafd2d5306d85105bcdb55b2c2422628ecaa
treebd299847626e772a9f7edb0753c2866b13d2ce62
parent2a0318b45560f840479547b64b9032da49be16f0
Implement folly::launder for MSVC

Summary:
This implementation should suffice for MSVC. _ReadWriteBarrier()
generates no instructions but instructs the compiler not to reorder accesses
around it, and we have to rely on MSVC not currently having any other
optimizations for const members to worry about.

Reviewed By: yfeldblum

Differential Revision: D5723782

fbshipit-source-id: a68caa4673a5c410b326c1d2e3c0752bd945f4a6
folly/Launder.h