According to cppreference and this answer, C++ should not automatically generate a move constructor if there is a user declared destructor. Checking this in practice with Clang, however, I see an auto-generated move constructor. The following code prints "is_move_constructible: 1":
#include <iostream>
#include <type_traits>
struct TestClass
{
~TestClass()
{}
};
int main( int argc, char** argv )
{
std::cout << "is_move_constructible: " << std::is_move_constructible<TestClass>::value << std::endl;
}
Am I misunderstanding "there is no user-declared destructor" or std::is_move_constructible? I'm compiling with '-std=c++14' and Apple LLVM version 7.0.2 (clang-700.1.81).