diff --git a/include/type_traits b/include/type_traits index 7eb0c03b..bd10697c 100644 --- a/include/type_traits +++ b/include/type_traits @@ -1523,7 +1523,7 @@ struct is_assignable template struct _LIBCPP_TYPE_VIS_ONLY is_copy_assignable : public is_assignable::type, - const typename add_lvalue_reference<_Tp>::type> {}; + typename add_lvalue_reference::type>::type> {}; // is_move_assignable @@ -2637,8 +2637,8 @@ struct _LIBCPP_TYPE_VIS_ONLY is_default_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_copy_constructible - : public is_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type> - {}; + : public is_constructible<_Tp, + typename add_lvalue_reference::type>::type> {}; // is_move_constructible @@ -2842,8 +2842,7 @@ struct is_trivially_assignable<_Tp&, _Tp&&> template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_assignable : public is_trivially_assignable::type, - const typename add_lvalue_reference<_Tp>::type> - {}; + typename add_lvalue_reference::type>::type> {}; // is_trivially_move_assignable @@ -3034,8 +3033,8 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_default_constructib // is_nothrow_copy_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_constructible - : public is_nothrow_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type> - {}; + : public is_nothrow_constructible<_Tp, + typename add_lvalue_reference::type>::type> {}; // is_nothrow_move_constructible @@ -3119,8 +3118,7 @@ struct is_nothrow_assignable<_Tp&, _Tp&&> template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_assignable : public is_nothrow_assignable::type, - const typename add_lvalue_reference<_Tp>::type> - {}; + typename add_lvalue_reference::type>::type> {}; // is_nothrow_move_assignable diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp index bde44de4..c43d5947 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp @@ -52,6 +52,11 @@ class B B& operator=(const B&); }; +struct C +{ + void operator=(C&); // not const +}; + int main() { test_is_copy_assignable (); @@ -71,4 +76,5 @@ int main() test_is_not_copy_assignable (); #endif test_is_not_copy_assignable (); + test_is_not_copy_assignable (); } diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp index 837d0b0d..f878a50c 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp @@ -58,6 +58,12 @@ class B B(const B&); }; +struct C +{ + C(C&); // not const + void operator=(C&); // not const +}; + int main() { test_is_copy_constructible(); @@ -75,6 +81,7 @@ int main() test_is_not_copy_constructible(); test_is_not_copy_constructible(); test_is_not_copy_constructible(); + test_is_not_copy_constructible(); #if __has_feature(cxx_access_control_sfinae) test_is_not_copy_constructible(); #endif diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp index 3bd2b3b7..8fff5f8b 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp @@ -34,6 +34,11 @@ struct B void operator=(A); }; +struct C +{ + void operator=(C&); // not const +}; + int main() { test_is_nothrow_assignable (); @@ -46,4 +51,5 @@ int main() test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); + test_is_not_nothrow_assignable (); } diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp index 8978ec9a..9d3f8298 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp @@ -70,6 +70,12 @@ struct A A(const A&); }; +struct C +{ + C(C&); // not const + void operator=(C&); // not const +}; + int main() { test_is_nothrow_constructible (); @@ -80,4 +86,5 @@ int main() test_is_not_nothrow_constructible (); test_is_not_nothrow_constructible (); test_is_not_nothrow_constructible (); + test_is_not_nothrow_constructible (); } diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp index 984824a0..735d05fa 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp @@ -34,6 +34,11 @@ struct B void operator=(A); }; +struct C +{ + void operator=(C&); // not const +}; + int main() { test_is_trivially_assignable (); @@ -44,4 +49,5 @@ int main() test_is_not_trivially_assignable (); test_is_not_trivially_assignable (); test_is_not_trivially_assignable (); + test_is_not_trivially_assignable (); }