I\'ve been having issues using scoped_locked in VS 2017. I believe I traced them back to the
declaration, copied below. What would be the safest way t
From your question it is not clear if you want to disable/enable this behavior. But in general this can be controlled with the /std:c++latest
compiler argument and/or overriding _HAS_CXX17
as stated in the Visual C++ Team Blog. The issue is that without ovverides the _HAS_CXX17
is defined depending on the compiler version in yvals.h
(see this question) and thus this may vary depending on the version of Visual Studio (so I can't give you a straighforward answer what combo will give you the needed result since it is not clear whether you want to disable/enable it, and what is your exact Visual Studio version). As mentioned in the article, this has the downside that you may loose other features, since they did not provide a fine grained control over the STL. But you can try and see if reverting to the old STL behavior causes issues for you.