In VS2013 update 5, I\'ve got this:
class Lock
{
public:
Lock(CriticalSection& cs) : cs_(cs)
{}
Lock(const Lock&) = delete;
Lock(Lock&am
As of MSVC v19.14, MSVC (aka Visual Studio) also implements the C++17 behavior of allowing return
of a non-copyable, non-movable object in cases where the RVO applies: https://godbolt.org/z/fgUFdf
As rubenvb's answer indicates, this means that GCC, Clang, and MSVC all support this C++17 behavior: https://godbolt.org/z/Hq_GyG