PR other/90695 reduce testcase to remove library dependency
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / noexcept15.C
index 5cbbea8a91a42757fc697a61e44d8be70550cfe3..6c6eef689153c3791da997ac6ccdf69fc26f03cb 100644 (file)
@@ -1,12 +1,46 @@
 // PR c++/50391
 // { dg-do compile { target c++11 } }
 
-#include <type_traits>
+namespace std
+{
+  template<typename T, T Val>
+    struct integral_constant
+    { static constexpr T value = Val; };
+
+  template<typename T>
+    struct is_abstract
+    : integral_constant<bool, __is_abstract(T)>
+    { };
+
+  template<typename T, bool = is_abstract<T>::value>
+    struct is_destructible
+    : integral_constant<bool, true>
+    { };
+
+  template<typename T>
+    struct is_destructible<T, true>
+    : integral_constant<bool, false>
+    { };
+
+  template<typename T>
+    struct is_nothrow_move_constructible
+    : is_destructible<T>
+    { };
+
+  template<typename T>
+    struct decay
+    { typedef T type; };
+
+  template<typename T>
+    struct decay<T&>
+    { typedef T type; };
+
+} // std
 
 template<class Tp>
   struct single
   {
-    Tp elem;  // { dg-error "incomplete type" }
+    Tp elem;
 
     constexpr single(const Tp& e)
     : elem(e) { }
@@ -30,3 +64,5 @@ foo(Blob *b)
 {
   make_single(*b);
 }
+
+// { dg-excess-errors "incomplete type|not a member" }