For performance reasons I'm interested in making sure that RVO is being performed on the return values of functions. What would prevent this optimization from being performed by a modern C++ compiler (such as gcc, clang, and msvc 2015) which I should worry about?
Clarification Edit: What I am interested in is identifying (hopefully eventually through some form of static analysis, but that can come later) when a particular value with an expensive copy constructor (but a cheap move constructor) is being returned from a function, and RVO is not performed (meaning that an unnecessary copy constructor invocation is being performed). This is especially the case when a std::move() invocation could avoid this expensive operation.
I'm interested specifically in the situations when it is actually performed by compilers, rather than the situations where it would be allowed by the C++ 11 specification, which I imagine are more broad than the situations actually implemented. I am also interested in situations where the compiler automatically uses the move constructor rather than the copy constructor (If that is allowed).