Hi,I tried to use std::make_shared with a class that does only have a user-defined constructor and no default constructor. The compiler reports an error when I try to compile this:#include <memory>#include <utility>struct A{ A(int) {} A(A&& a) {}private: // uncomment next line to make it work // A() {} A(A const&); // not needed, jsut to make sure that it isn't accessed};void f(){ A b(1); std::shared_ptr<A> a = std::make_shared<A>( std::move(b) );}When you declare the default constructor, the compiler does not have a problem and even links it although there is no definition available. I double-checked with gcc 4.6 and this compiler does not report any error.It turns out that the problem only occurs when I use the compiler switch to turn some warnings into errors. I have prepared a complete project which reproduces the problem. If you remove the warnings in the advanced properties from the option "Treat some warning as errors", everything works fine.Best regards, Jens
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...