std::is_move_constructible in C++ with Examples Last Updated : 12 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The std::is_move_constructible template of C++ STL is present in the <type_traits> header file. The std::is_move_constructible template of C++ STL is used to check whether the T is move constructible (that can be constructed from an rvalue reference of its type) or not. It returns the boolean value either true or false. Header File: #include<type_traits> Template Class: template< class T > struct is_move_convertible; Syntax: std::is_move_constructible< datatype >::value << '\n' Parameters: The template std::is_move_constructible accepts a single parameter T (Trait class) to check whether T is move constructible type or not. Return Value: True: If a given data type T is is_move_constructible. False: If a given data type T is not is_move_constructible. Below is the program to demonstrate std::is_move_constructible: Program: CPP // C++ program to illustrate // std::is_move_constructible #include <bits/stdc++.h> #include <type_traits> using namespace std; // Declare structures struct B { }; struct A { A& operator=(A&) = delete; }; class C { int n; C(C&&) = default; }; class D { D(const D&) {} }; // Driver Code int main() { cout << boolalpha; // Check if char is move constructible or not cout << "char: " << is_move_constructible<char>::value << endl; // Check if struct A is move constructible or not cout << "struct A: " << is_move_constructible<A>::value << endl; // Check if struct B is move constructible or not cout << "struct B: " << is_move_constructible<B>::value << endl; // Check if class C is move constructible or not cout << "class C: " << is_move_constructible<C>::value << endl; // Check if class D is move constructible or not cout << "class D: " << is_move_constructible<D>::value << endl; return 0; } Output: char: true struct A: true struct B: true class C: false class D: false Reference: http://www.cplusplus.com/reference/type_traits/is_move_constructible/ Comment More infoAdvertise with us Next Article std::is_default_constructible in C++ with Examples B bansal_rtk_ Follow Improve Article Tags : Misc C++ CPP-Functions Practice Tags : CPPMisc Similar Reads std::is_nothrow_move_constructible in C++ with Example The std::is_nothrow_move_constructible template of C++ STL is present in the <type_traits> header file. The std::is_nothrow_move_constructible template of C++ STL is used to check whether the given type T T is move constructibe or not and this is known for not to throw any exception. It return 2 min read std::is_trivially_move_constructible in C++ with Examples The std::is_trivially_move_constructible template of C++ STL is present in the <type_traits> header file. The std::is_trivially_move_constructible template of C++ STL is used to check whether the T is trivially move constructibe or not. It return the boolean value true if T is trivially move c 3 min read std::is_nothrow_constructible in C++ with Examples The std::is_nothrow_constructible template of C++ STL is present in the <type_traits> header file. The std::is_nothrow_constructible template of C++ STL is used to check whether the given type T is constructible type with the set of arguments or not and this is known for not to throw any excep 2 min read std::is_copy_constructible in C++ with Examples The std::is_copy_constructible template of C++ STL is present in the <type_traits> header file. The std::is_copy_constructible template of C++ STL is used to check whether the T is copy constructible or not. It return the boolean value true if T is copy constructible type, Otherwise return fal 2 min read std::is_default_constructible in C++ with Examples The std::is_default_constructible template of C++ STL is present in the <type_traits> header file. The std::is_default_constructible template of C++ STL is used to check whether the T is default constructible or not. A default constructible can be constructed without arguments or initializatio 2 min read std::is_destructible in C++ with Example The std::is_destructible template of C++ STL is present in the <type_traits> header file. The std::is_destructible template of C++ STL is used to check whether the T is destructible or not. A class is called destructible whose destructor is not deleted and potentially accessible in derived cla 2 min read Like