This is not a copy nor a move. (C++ 17) struct S { S() = default; S(S&&) = delete; S(const S&) = delete; }; auto s_factory() { return S{}; } int main() { return 0; }