Std::is copy assignable
lastmod 2026-11-10created 2015-09-082 edits
std::is_copy_assignable is a type trait in C++11 <type_traits> that determines at compile time whether a given type can be copy-assigned from an lvalue reference of the same type. The result is obtained through the value member or std::is_copy_assignable_v, and it comes with the variants is_nothrow_copy_assignable, which additionally requires that no exception is thrown, and is_trivially_copy_assignable, which checks for trivial copy assignment. It is used to check type requirements in templates or in static_assert.