diff mbox

[v3] LWG 2101, LWG 2196, and more

Message ID 51BA53C7.8070906@oracle.com
State New
Headers show

Commit Message

Paolo Carlini June 13, 2013, 11:20 p.m. UTC
Hi,

I applied this nice batch of <type_traits> improvements coming from Daniel.

Thanks,
Paolo.

//////////////////////
2013-06-13  Daniel Krugler  <daniel.kruegler@gmail.com>

	* include/std/type_traits (is_function): Support ref-qualified
	functions.
	(is_copy_constructible, is_move_constructible, is_copy_assignable,
	is_move_assignable, is_nothrow_copy_constructible,
	is_nothrow_move_constructible, is_nothrow_copy_assignable,
	is_nothrow_move_assignable): Implement LWG 2196.
	(add_lvalue_reference, add_rvalue_reference, add_pointer): Implement
	LWG 2101.
	(__strip_reference_wrapper<<const reference_wrapper<_Tp>>): Remove,
	unused.
	* testsuite/20_util/add_lvalue_reference/value.cc: Extend.
	* testsuite/20_util/add_rvalue_reference/value.cc: Likewise.
	* testsuite/20_util/decay/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_assignable/value.cc: Likewise.
	* testsuite/20_util/is_constructible/value-2.cc: Likewise.
	* testsuite/20_util/is_copy_assignable/value.cc: Likewise.
	* testsuite/20_util/is_copy_constructible/value.cc: Likewise.
	* testsuite/20_util/is_function/value.cc: Likewise.
	* testsuite/20_util/is_move_assignable/value.cc: Likewise.
	* testsuite/20_util/is_move_constructible/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_assignable/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_constructible/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_assignable/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_constructible/value.cc: Likewise.

	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
	line number.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
diff mbox

Patch

Index: include/std/type_traits
===================================================================
--- include/std/type_traits	(revision 200079)
+++ include/std/type_traits	(working copy)
@@ -377,33 +377,97 @@ 
     : public true_type { };
 
   template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) &&>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
     struct is_function<_Res(_ArgTypes......)>
     : public true_type { };
 
   template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) &&>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
     struct is_function<_Res(_ArgTypes...) const>
     : public true_type { };
 
   template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) const &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) const &&>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
     struct is_function<_Res(_ArgTypes......) const>
     : public true_type { };
 
   template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) const &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) const &&>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
     struct is_function<_Res(_ArgTypes...) volatile>
     : public true_type { };
 
   template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) volatile &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) volatile &&>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
     struct is_function<_Res(_ArgTypes......) volatile>
     : public true_type { };
 
   template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) volatile &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) volatile &&>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
     struct is_function<_Res(_ArgTypes...) const volatile>
     : public true_type { };
 
   template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) const volatile &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes...) const volatile &&>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
     struct is_function<_Res(_ArgTypes......) const volatile>
     : public true_type { };
 
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) const volatile &>
+    : public true_type { };
+
+  template<typename _Res, typename... _ArgTypes>
+    struct is_function<_Res(_ArgTypes......) const volatile &&>
+    : public true_type { };
+
   template<typename>
     struct __is_null_pointer_helper
     : public false_type { };
@@ -482,6 +546,23 @@ 
     : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
     { };
 
+  // Utility to detect referenceable types ([defns.referenceable]).
+
+  template<typename _Tp>
+    struct __is_referenceable
+    : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
+    { };
+
+  template<typename _Res, typename... _Args>
+    struct __is_referenceable<_Res(_Args...)>
+    : public true_type
+    { };
+
+  template<typename _Res, typename... _Args>
+    struct __is_referenceable<_Res(_Args......)>
+    : public true_type
+    { };
+
   // Type properties.
 
   /// is_const
@@ -947,15 +1028,15 @@ 
     : public __is_constructible_impl<_Tp, _Args...>::type
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_copy_constructible_impl;
 
   template<typename _Tp>
-    struct __is_copy_constructible_impl<_Tp, true>
+    struct __is_copy_constructible_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_copy_constructible_impl<_Tp, false>
+    struct __is_copy_constructible_impl<_Tp, true>
     : public is_constructible<_Tp, const _Tp&>
     { };
 
@@ -965,15 +1046,15 @@ 
     : public __is_copy_constructible_impl<_Tp>
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_move_constructible_impl;
 
   template<typename _Tp>
-    struct __is_move_constructible_impl<_Tp, true>
+    struct __is_move_constructible_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_move_constructible_impl<_Tp, false>
+    struct __is_move_constructible_impl<_Tp, true>
     : public is_constructible<_Tp, _Tp&&>
     { };
 
@@ -1033,15 +1114,15 @@ 
 		    __is_nt_constructible_impl<_Tp, _Args...>>::type
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_nothrow_copy_constructible_impl;
 
   template<typename _Tp>
-    struct __is_nothrow_copy_constructible_impl<_Tp, true>
+    struct __is_nothrow_copy_constructible_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_nothrow_copy_constructible_impl<_Tp, false>
+    struct __is_nothrow_copy_constructible_impl<_Tp, true>
     : public is_nothrow_constructible<_Tp, const _Tp&>
     { };
 
@@ -1051,15 +1132,15 @@ 
     : public __is_nothrow_copy_constructible_impl<_Tp>
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_nothrow_move_constructible_impl;
 
   template<typename _Tp>
-    struct __is_nothrow_move_constructible_impl<_Tp, true>
+    struct __is_nothrow_move_constructible_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_nothrow_move_constructible_impl<_Tp, false>
+    struct __is_nothrow_move_constructible_impl<_Tp, true>
     : public is_nothrow_constructible<_Tp, _Tp&&>
     { };
 
@@ -1091,15 +1172,15 @@ 
       : public __is_assignable_helper<_Tp, _Up>::type
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_copy_assignable_impl;
 
   template<typename _Tp>
-    struct __is_copy_assignable_impl<_Tp, true>
+    struct __is_copy_assignable_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_copy_assignable_impl<_Tp, false>
+    struct __is_copy_assignable_impl<_Tp, true>
     : public is_assignable<_Tp&, const _Tp&>
     { };
 
@@ -1109,15 +1190,15 @@ 
     : public __is_copy_assignable_impl<_Tp>
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_move_assignable_impl;
 
   template<typename _Tp>
-    struct __is_move_assignable_impl<_Tp, true>
+    struct __is_move_assignable_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_move_assignable_impl<_Tp, false>
+    struct __is_move_assignable_impl<_Tp, true>
     : public is_assignable<_Tp&, _Tp&&>
     { };
 
@@ -1139,15 +1220,15 @@ 
 		    __is_nt_assignable_impl<_Tp, _Up>>::type
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_nt_copy_assignable_impl;
 
   template<typename _Tp>
-    struct __is_nt_copy_assignable_impl<_Tp, true>
+    struct __is_nt_copy_assignable_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_nt_copy_assignable_impl<_Tp, false>
+    struct __is_nt_copy_assignable_impl<_Tp, true>
     : public is_nothrow_assignable<_Tp&, const _Tp&>
     { };
 
@@ -1157,15 +1238,15 @@ 
     : public __is_nt_copy_assignable_impl<_Tp>
     { };
 
-  template<typename _Tp, bool = is_void<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __is_nt_move_assignable_impl;
 
   template<typename _Tp>
-    struct __is_nt_move_assignable_impl<_Tp, true>
+    struct __is_nt_move_assignable_impl<_Tp, false>
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_nt_move_assignable_impl<_Tp, false>
+    struct __is_nt_move_assignable_impl<_Tp, true>
     : public is_nothrow_assignable<_Tp&, _Tp&&>
     { };
 
@@ -1373,30 +1454,21 @@ 
     struct remove_reference<_Tp&&>
     { typedef _Tp   type; };
 
-  template<typename _Tp,
-	   bool = __and_<__not_<is_reference<_Tp>>,
-                         __not_<is_void<_Tp>>>::value,
-	   bool = is_rvalue_reference<_Tp>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __add_lvalue_reference_helper
     { typedef _Tp   type; };
 
   template<typename _Tp>
-    struct __add_lvalue_reference_helper<_Tp, true, false>
+    struct __add_lvalue_reference_helper<_Tp, true>
     { typedef _Tp&   type; };
 
-  template<typename _Tp>
-    struct __add_lvalue_reference_helper<_Tp, false, true>
-    { typedef typename remove_reference<_Tp>::type&   type; };
-
   /// add_lvalue_reference
   template<typename _Tp>
     struct add_lvalue_reference
     : public __add_lvalue_reference_helper<_Tp>
     { };
 
-  template<typename _Tp,
-           bool = __and_<__not_<is_reference<_Tp>>,
-                         __not_<is_void<_Tp>>>::value>
+  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
     struct __add_rvalue_reference_helper
     { typedef _Tp   type; };
 
@@ -1654,11 +1726,21 @@ 
     { };
 
   /// add_pointer
+  template<typename _Tp, bool = __or_<__is_referenceable<_Tp>,
+				      is_void<_Tp>>::value>
+    struct __add_pointer_helper
+    { typedef _Tp     type; };
+
   template<typename _Tp>
-    struct add_pointer
+    struct __add_pointer_helper<_Tp, true>
     { typedef typename remove_reference<_Tp>::type*     type; };
 
+  template<typename _Tp>
+    struct add_pointer 
+    : public __add_pointer_helper<_Tp>
+    { };
 
+
   template<std::size_t _Len>
     struct __aligned_storage_msa
     { 
@@ -1738,12 +1820,6 @@ 
     };
 
   template<typename _Tp>
-    struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
-    {
-      typedef _Tp& __type;
-    };
-
-  template<typename _Tp>
     struct __decay_and_strip
     {
       typedef typename __strip_reference_wrapper<
Index: testsuite/20_util/add_lvalue_reference/value.cc
===================================================================
--- testsuite/20_util/add_lvalue_reference/value.cc	(revision 200079)
+++ testsuite/20_util/add_lvalue_reference/value.cc	(working copy)
@@ -40,6 +40,10 @@ 
   VERIFY( (is_same<add_lvalue_reference<ClassType&&>::type, ClassType&>::value) );
   VERIFY( (is_same<add_lvalue_reference<void>::type, void>::value) );
   VERIFY( (is_same<add_lvalue_reference<const void>::type, const void>::value) );  
+  VERIFY( (is_same<add_lvalue_reference<bool(int) const>::type, bool(int) const>::value) );  
+  VERIFY( (is_same<add_lvalue_reference<bool(int) &>::type, bool(int) &>::value) );  
+  VERIFY( (is_same<add_lvalue_reference<bool(int) const &&>::type, bool(int) const &&>::value) );  
+  VERIFY( (is_same<add_lvalue_reference<bool(int)>::type, bool(&)(int)>::value) );  
 }
 
 int main()
Index: testsuite/20_util/add_rvalue_reference/value.cc
===================================================================
--- testsuite/20_util/add_rvalue_reference/value.cc	(revision 200079)
+++ testsuite/20_util/add_rvalue_reference/value.cc	(working copy)
@@ -31,6 +31,7 @@ 
 
   VERIFY( (is_same<add_rvalue_reference<int>::type, int&&>::value) );
   VERIFY( (is_same<add_rvalue_reference<int&&>::type, int&&>::value) );
+  VERIFY( (is_same<add_rvalue_reference<int&>::type, int&>::value) );
   VERIFY( (is_same<add_rvalue_reference<const int>::type, const int&&>::value) );
   VERIFY( (is_same<add_rvalue_reference<int*>::type, int*&&>::value) );
   VERIFY( (is_same<add_rvalue_reference<ClassType&&>::type, ClassType&&>::value) );
@@ -38,6 +39,10 @@ 
   VERIFY( (is_same<add_rvalue_reference<int(int)>::type, int(&&)(int)>::value) );
   VERIFY( (is_same<add_rvalue_reference<void>::type, void>::value) );
   VERIFY( (is_same<add_rvalue_reference<const void>::type, const void>::value) );  
+  VERIFY( (is_same<add_rvalue_reference<bool(int) const>::type, bool(int) const>::value) );  
+  VERIFY( (is_same<add_rvalue_reference<bool(int) &>::type, bool(int) &>::value) );  
+  VERIFY( (is_same<add_rvalue_reference<bool(int) const &&>::type, bool(int) const &&>::value) );  
+  VERIFY( (is_same<add_rvalue_reference<bool(int)>::type, bool(&&)(int)>::value) );  
 }
 
 int main()
Index: testsuite/20_util/decay/requirements/typedefs.cc
===================================================================
--- testsuite/20_util/decay/requirements/typedefs.cc	(revision 200079)
+++ testsuite/20_util/decay/requirements/typedefs.cc	(working copy)
@@ -43,6 +43,10 @@ 
   typedef void (fn_type) ();
   typedef decay<fn_type>::type  	test4_type;
   VERIFY( (is_same<test4_type, std::add_pointer<fn_type>::type>::value) );
+
+  typedef void (cfn_type) () const;
+  typedef decay<cfn_type>::type  	test5_type;
+  VERIFY( (is_same<test5_type, cfn_type>::value) );
 }
 
 int main()
Index: testsuite/20_util/declval/requirements/1_neg.cc
===================================================================
--- testsuite/20_util/declval/requirements/1_neg.cc	(revision 200079)
+++ testsuite/20_util/declval/requirements/1_neg.cc	(working copy)
@@ -19,7 +19,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-error "static assertion failed" "" { target *-*-* } 1862 }
+// { dg-error "static assertion failed" "" { target *-*-* } 1938 }
 
 #include <utility>
 
Index: testsuite/20_util/is_assignable/value.cc
===================================================================
--- testsuite/20_util/is_assignable/value.cc	(revision 200079)
+++ testsuite/20_util/is_assignable/value.cc	(working copy)
@@ -277,8 +277,8 @@ 
 static_assert(!std::is_assignable<DelAnyAssign&, const int&>::value, "Error");
 static_assert(!std::is_assignable<DelAnyAssign&, void>::value, "Error");
 static_assert(!std::is_assignable<DelAnyAssign&, void()>::value, "Error");
-// static_assert(!std::is_assignable<DelAnyAssign&, void()
-// const>::value, "Error");
+static_assert(!std::is_assignable<DelAnyAssign&, 
+  void() const>::value, "Error");
 static_assert(!std::is_assignable<DelAnyAssign&, void(&)()>::value, "Error");
 static_assert(!std::is_assignable<DelAnyAssign&, void(&&)()>::value, "Error");
 static_assert(!std::is_assignable<DelAnyAssign&,
@@ -580,6 +580,9 @@ 
 UAssignAll&>::value, "Error");
 static_assert(!std::is_assignable<const UAssignAll&, const
 UAssignAll&>::value, "Error");
+static_assert(!std::is_assignable<UAssignAll&, void() const>::value, "Error");
+static_assert(!std::is_assignable<UAssignAll&, void() &>::value, "Error");
+static_assert(!std::is_assignable<UAssignAll&, void() const volatile &&>::value, "Error");
 
 static_assert(std::is_assignable<UAssignAll&, int>::value, "Error");
 static_assert(std::is_assignable<UAssignAll&, int&>::value, "Error");
@@ -600,7 +603,6 @@ 
 std::nullptr_t&>::value, "Error");
 static_assert(std::is_assignable<UAssignAll&, void()>::value, "Error");
 static_assert(std::is_assignable<UAssignAll&, void(&)()>::value, "Error");
-//static_assert(std::is_assignable<UAssignAll&, void() const>::value, "Error");
 static_assert(std::is_assignable<UAssignAll&, void(*)()>::value, "Error");
 static_assert(std::is_assignable<UAssignAll&, void(*&)()>::value, "Error");
 static_assert(std::is_assignable<UAssignAll&, int*>::value, "Error");
@@ -636,8 +638,8 @@ 
 std::nullptr_t&>::value, "Error");
 static_assert(!std::is_assignable<UDelAssignAll&, void()>::value, "Error");
 static_assert(!std::is_assignable<UDelAssignAll&, void(&)()>::value, "Error");
-// static_assert(!std::is_assignable<UDelAssignAll&, void()
-// const>::value, "Error");
+static_assert(!std::is_assignable<UDelAssignAll&, void()
+ const>::value, "Error");
 static_assert(!std::is_assignable<UDelAssignAll&, void(*)()>::value, "Error");
 static_assert(!std::is_assignable<UDelAssignAll&, void(*&)()>::value, "Error");
 static_assert(!std::is_assignable<UDelAssignAll&, int*>::value, "Error");
Index: testsuite/20_util/is_constructible/value-2.cc
===================================================================
--- testsuite/20_util/is_constructible/value-2.cc	(revision 200079)
+++ testsuite/20_util/is_constructible/value-2.cc	(working copy)
@@ -72,8 +72,8 @@ 
 static_assert(!std::is_constructible<DelEllipsis, OpE>::value, "Error");
 static_assert(!std::is_constructible<DelEllipsis, OpSE>::value, "Error");
 static_assert(!std::is_constructible<DelEllipsis, void()>::value, "Error");
-// static_assert(!std::is_constructible<DelEllipsis, void() const>::value,
-// 	      "Error");
+static_assert(!std::is_constructible<DelEllipsis, void() const>::value,
+ 	      "Error");
 static_assert(!std::is_constructible<DelEllipsis, int[1]>::value, "Error");
 static_assert(!std::is_constructible<DelEllipsis, int[]>::value, "Error");
 static_assert(!std::is_constructible<DelEllipsis, int*>::value, "Error");
@@ -461,20 +461,20 @@ 
 static_assert(!std::is_constructible<int[], void()>::value, "Error");
 static_assert(!std::is_constructible<int[1], void()>::value, "Error");
 
-// static_assert(!std::is_constructible<void(int) const,
-// 	      void() const>::value, "Error");
-// static_assert(!std::is_constructible<int, void() const>::value, "Error");
-// static_assert(!std::is_constructible<Abstract, void() const>::value, "Error");
-// static_assert(!std::is_constructible<std::nullptr_t, void() const>::value,
-// 	      "Error");
-// static_assert(!std::is_constructible<Empty, void() const>::value, "Error");
-// static_assert(!std::is_constructible<U, void() const>::value, "Error");
-// static_assert(!std::is_constructible<E, void() const>::value, "Error");
-// static_assert(!std::is_constructible<SE, void() const>::value, "Error");
-// static_assert(!std::is_constructible<OpE, void() const>::value, "Error");
-// static_assert(!std::is_constructible<OpSE, void() const>::value, "Error");
-// static_assert(!std::is_constructible<int[], void() const>::value, "Error");
-// static_assert(!std::is_constructible<int[1], void() const>::value, "Error");
+static_assert(!std::is_constructible<void(int) const,
+      void() const>::value, "Error");
+static_assert(!std::is_constructible<int, void() const>::value, "Error");
+static_assert(!std::is_constructible<Abstract, void() const>::value, "Error");
+static_assert(!std::is_constructible<std::nullptr_t, void() const>::value,
+      "Error");
+static_assert(!std::is_constructible<Empty, void() const>::value, "Error");
+static_assert(!std::is_constructible<U, void() const>::value, "Error");
+static_assert(!std::is_constructible<E, void() const>::value, "Error");
+static_assert(!std::is_constructible<SE, void() const>::value, "Error");
+static_assert(!std::is_constructible<OpE, void() const>::value, "Error");
+static_assert(!std::is_constructible<OpSE, void() const>::value, "Error");
+static_assert(!std::is_constructible<int[], void() const>::value, "Error");
+static_assert(!std::is_constructible<int[1], void() const>::value, "Error");
 
 static_assert(!std::is_constructible<void, int, int>::value, "Error");
 static_assert(!std::is_constructible<void, Empty, B>::value, "Error");
@@ -488,8 +488,8 @@ 
 static_assert(!std::is_constructible<void, void, int>::value, "Error");
 static_assert(!std::is_constructible<void, void, void>::value, "Error");
 static_assert(!std::is_constructible<void, void(), void()>::value, "Error");
-// static_assert(!std::is_constructible<void, void() const,
-// 	      void() volatile>::value, "Error");
+static_assert(!std::is_constructible<void, void() const,
+	      void() volatile>::value, "Error");
 
 static_assert(!std::is_constructible<int, int, int>::value, "Error");
 static_assert(!std::is_constructible<const int, int, int>::value, "Error");
@@ -651,13 +651,13 @@ 
 static_assert(!std::is_constructible<void(), void(), int>::value, "Error");
 static_assert(!std::is_constructible<void(), void(), void()>::value, "Error");
 
-// static_assert(!std::is_constructible<void() const, int, int>::value, "Error");
-// static_assert(!std::is_constructible<void() const, void, int>::value, "Error");
-// static_assert(!std::is_constructible<void() const, void, void>::value, "Error");
-// static_assert(!std::is_constructible<void() const, void() volatile,
-// 	      int>::value, "Error");
-// static_assert(!std::is_constructible<void() const, void() volatile const,
-// 	      void() const>::value, "Error");
+static_assert(!std::is_constructible<void() const, int, int>::value, "Error");
+static_assert(!std::is_constructible<void() const, void, int>::value, "Error");
+static_assert(!std::is_constructible<void() const, void, void>::value, "Error");
+static_assert(!std::is_constructible<void() const, void() volatile,
+	      int>::value, "Error");
+static_assert(!std::is_constructible<void() const, void() volatile const,
+ 	      void() const>::value, "Error");
 
 static_assert(!std::is_constructible<FromArgs<int>, int, int>::value, "Error");
 static_assert(!std::is_constructible<const FromArgs<int>, int, int>::value,
Index: testsuite/20_util/is_copy_assignable/value.cc
===================================================================
--- testsuite/20_util/is_copy_assignable/value.cc	(revision 200079)
+++ testsuite/20_util/is_copy_assignable/value.cc	(working copy)
@@ -52,6 +52,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_property<is_copy_assignable, 
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_property<is_copy_assignable, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_property<is_copy_assignable, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_property<is_copy_assignable, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_property<is_copy_assignable, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_copy_assignable, NoexceptMoveAssignClass>(false)) );
   VERIFY( (test_property<is_copy_assignable, ExceptMoveAssignClass>(false)) );
Index: testsuite/20_util/is_copy_constructible/value.cc
===================================================================
--- testsuite/20_util/is_copy_constructible/value.cc	(revision 200079)
+++ testsuite/20_util/is_copy_constructible/value.cc	(working copy)
@@ -61,6 +61,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_category<is_copy_constructible,
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_category<is_copy_constructible, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_category<is_copy_constructible, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_category<is_copy_constructible, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_category<is_copy_constructible, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_copy_constructible,
 	   volatile NoexceptCopyConsClass>(false)) );
Index: testsuite/20_util/is_function/value.cc
===================================================================
--- testsuite/20_util/is_function/value.cc	(revision 200079)
+++ testsuite/20_util/is_function/value.cc	(working copy)
@@ -32,6 +32,9 @@ 
   VERIFY( (test_category<is_function, ClassType (ClassType)>(true)) );
   VERIFY( (test_category<is_function, float (int, float, int[], int&)>(true)) );
   VERIFY( (test_category<is_function, int (int, ...)>(true)) );
+  VERIFY( (test_category<is_function, bool (ClassType) const>(true)) );
+  VERIFY( (test_category<is_function, ClassType () &>(true)) );
+  VERIFY( (test_category<is_function, char (int, ClassType) const volatile &&>(true)) );
 
   // Negative tests.
   VERIFY( (test_category<is_function, int&>(false)) );
Index: testsuite/20_util/is_move_assignable/value.cc
===================================================================
--- testsuite/20_util/is_move_assignable/value.cc	(revision 200079)
+++ testsuite/20_util/is_move_assignable/value.cc	(working copy)
@@ -54,6 +54,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_property<is_move_assignable, 
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_property<is_move_assignable, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_property<is_move_assignable, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_property<is_move_assignable, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_property<is_move_assignable, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_move_assignable, DeletedCopyAssignClass>(false)) );
   VERIFY( (test_property<is_move_assignable, DeletedMoveAssignClass>(false)) );
Index: testsuite/20_util/is_move_constructible/value.cc
===================================================================
--- testsuite/20_util/is_move_constructible/value.cc	(revision 200079)
+++ testsuite/20_util/is_move_constructible/value.cc	(working copy)
@@ -59,6 +59,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_category<is_move_constructible,
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_category<is_move_constructible, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_category<is_move_constructible, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_category<is_move_constructible, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_category<is_move_constructible, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_move_constructible,
 	   const NoexceptMoveConsClass>(false)) );
Index: testsuite/20_util/is_nothrow_copy_assignable/value.cc
===================================================================
--- testsuite/20_util/is_nothrow_copy_assignable/value.cc	(revision 200079)
+++ testsuite/20_util/is_nothrow_copy_assignable/value.cc	(working copy)
@@ -55,6 +55,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_property<is_nothrow_copy_assignable, 
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_property<is_nothrow_copy_assignable, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_property<is_nothrow_copy_assignable, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_property<is_nothrow_copy_assignable, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_property<is_nothrow_copy_assignable, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_nothrow_copy_assignable,
 	   ExceptCopyAssignClass>(false)) );
Index: testsuite/20_util/is_nothrow_copy_constructible/value.cc
===================================================================
--- testsuite/20_util/is_nothrow_copy_constructible/value.cc	(revision 200079)
+++ testsuite/20_util/is_nothrow_copy_constructible/value.cc	(working copy)
@@ -58,6 +58,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_category<is_nothrow_copy_constructible,
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_category<is_nothrow_copy_constructible, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_category<is_nothrow_copy_constructible, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_category<is_nothrow_copy_constructible, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_category<is_nothrow_copy_constructible, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_nothrow_copy_constructible,
 	   volatile NoexceptCopyConsClass>(false)) );
Index: testsuite/20_util/is_nothrow_move_assignable/value.cc
===================================================================
--- testsuite/20_util/is_nothrow_move_assignable/value.cc	(revision 200079)
+++ testsuite/20_util/is_nothrow_move_assignable/value.cc	(working copy)
@@ -57,6 +57,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_property<is_nothrow_move_assignable, 
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_property<is_nothrow_move_assignable, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_property<is_nothrow_move_assignable, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_property<is_nothrow_move_assignable, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_property<is_nothrow_move_assignable, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_nothrow_move_assignable,
 	   ExceptMoveAssignClass>(false)) );
Index: testsuite/20_util/is_nothrow_move_constructible/value.cc
===================================================================
--- testsuite/20_util/is_nothrow_move_constructible/value.cc	(revision 200079)
+++ testsuite/20_util/is_nothrow_move_constructible/value.cc	(working copy)
@@ -55,6 +55,14 @@ 
 	   int (ClassType::*[2][3])>(false)) );
   VERIFY( (test_category<is_nothrow_move_constructible,
 	   int (ClassType::*[][2][3]) (int)>(false)) );
+  VERIFY( (test_category<is_nothrow_move_constructible, 
+       ClassType(unsigned) const &>(false)) );
+  VERIFY( (test_category<is_nothrow_move_constructible, 
+       bool(ClassType) const>(false)) );
+  VERIFY( (test_category<is_nothrow_move_constructible, 
+       bool(...) &&>(false)) );
+  VERIFY( (test_category<is_nothrow_move_constructible, 
+       EnumType(int, ...)>(false)) );
 
   VERIFY( (test_property<is_nothrow_move_constructible,
 	   const NoexceptMoveConsClass>(false)) );
Index: testsuite/20_util/make_signed/requirements/typedefs_neg.cc
===================================================================
--- testsuite/20_util/make_signed/requirements/typedefs_neg.cc	(revision 200079)
+++ testsuite/20_util/make_signed/requirements/typedefs_neg.cc	(working copy)
@@ -48,5 +48,5 @@ 
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1604 }
-// { dg-error "declaration of" "" { target *-*-* } 1568 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1676 }
+// { dg-error "declaration of" "" { target *-*-* } 1640 }
Index: testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
===================================================================
--- testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc	(revision 200079)
+++ testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc	(working copy)
@@ -48,5 +48,5 @@ 
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1522 }
-// { dg-error "declaration of" "" { target *-*-* } 1486 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1594 }
+// { dg-error "declaration of" "" { target *-*-* } 1558 }