re PR libstdc++/60132 (C++11: lack of is_trivially_copy_constructible)
authorVille Voutilainen <ville.voutilainen@gmail.com>
Thu, 9 Oct 2014 08:37:26 +0000 (11:37 +0300)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 9 Oct 2014 08:37:26 +0000 (08:37 +0000)
2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>

PR libstdc++/60132
     * include/std/type_traits (is_trivially_copyable,
     is_trivially_constructible, is_trivially_default_constructible,
     is_trivially_copy_constructible, is_trivially_move_constructible,
     is_trivially_assignable, is_trivially_copy_assignable,
     is_trivially_move_assignable): New.
     * testsuite/20_util/is_trivially_assignable/requirements/
     typedefs.cc: Likewise.
     * testsuite/20_util/is_trivially_assignable/requirements/
     explicit_instantiation.cc: Likewise.
     * testsuite/20_util/is_trivially_assignable/value.cc: Likewise.
* testsuite/20_util/is_trivially_constructible/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/is_trivially_constructible/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
* testsuite/20_util/is_trivially_copyable/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/is_trivially_copyable/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/is_trivially_copyable/value.cc: Likewise.
* testsuite/20_util/is_trivially_copy_assignable/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/is_trivially_copy_assignable/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/is_trivially_copy_assignable/value.cc: Likewise.
* testsuite/20_util/is_trivially_copy_constructible/requirements/
typedefs.cc: Likewise.
* testsuite/20_util/is_trivially_copy_constructible/requirements/
explicit_instantiation.cc: Likewise.
     * testsuite/20_util/is_trivially_copy_constructible/value.cc: Likewise.
     * testsuite/20_util/is_trivially_default_constructible/requirements/
     typedefs.cc: Likewise.
     * testsuite/20_util/is_trivially_default_constructible/requirements/
     explicit_instantiation.cc: Likewise.
     * testsuite/20_util/is_trivially_default_constructible/
value.cc: Likewise.
     * testsuite/20_util/is_trivially_move_assignable/requirements/
     typedefs.cc: Likewise.
     * testsuite/20_util/is_trivially_move_assignable/requirements/
     explicit_instantiation.cc: Likewise.
     * testsuite/20_util/is_trivially_move_assignable/value.cc: Likewise.
     * testsuite/20_util/is_trivially_move_constructible/requirements/
     typedefs.cc: Likewise.
     * testsuite/20_util/is_trivially_move_constructible/requirements/
     explicit_instantiation.cc: Likewise.
     * testsuite/20_util/is_trivially_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.

From-SVN: r216032

29 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
libstdc++-v3/testsuite/20_util/is_trivially_assignable/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_assignable/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_assignable/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_constructible/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_constructible/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_constructible/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copyable/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copyable/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_copyable/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc

index da92622d7b92e3beb4b5b269b666805ffcd75e59..89309fdb19fc5bdef2379f6c5f8baae281a2f168 100644 (file)
@@ -1,3 +1,60 @@
+2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+
+       PR libstdc++/60132
+       * include/std/type_traits (is_trivially_copyable,
+       is_trivially_constructible, is_trivially_default_constructible,
+       is_trivially_copy_constructible, is_trivially_move_constructible,
+       is_trivially_assignable, is_trivially_copy_assignable,
+       is_trivially_move_assignable): New.
+       * testsuite/20_util/is_trivially_assignable/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_assignable/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_assignable/value.cc: Likewise.
+       * testsuite/20_util/is_trivially_constructible/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_constructible/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
+       * testsuite/20_util/is_trivially_copyable/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_copyable/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_copyable/value.cc: Likewise.
+       * testsuite/20_util/is_trivially_copy_assignable/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_copy_assignable/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_copy_assignable/value.cc: Likewise.
+       * testsuite/20_util/is_trivially_copy_constructible/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_copy_constructible/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_copy_constructible/value.cc: Likewise.
+       * testsuite/20_util/is_trivially_default_constructible/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_default_constructible/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_default_constructible/
+       value.cc: Likewise.
+       * testsuite/20_util/is_trivially_move_assignable/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_move_assignable/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_move_assignable/value.cc: Likewise.
+       * testsuite/20_util/is_trivially_move_constructible/requirements/
+       typedefs.cc: Likewise.
+       * testsuite/20_util/is_trivially_move_constructible/requirements/
+       explicit_instantiation.cc: Likewise.
+       * testsuite/20_util/is_trivially_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.
+
 2014-10-08  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/bits/locale_facets.tcc (num_put::_M_insert_float): Do not
index 66900449b9a51c908b4242bc1e2a3eecbab86508..d776efeb68de748627c3aa747200afa8e166210e 100644 (file)
@@ -606,7 +606,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : public integral_constant<bool, __is_trivial(_Tp)>
     { };
 
-  // is_trivially_copyable (still unimplemented)
+  // is_trivially_copyable
+  template<typename _Tp>
+    struct is_trivially_copyable
+    : public integral_constant<bool, __is_trivially_copyable(_Tp)>
+    { };
 
   /// is_standard_layout
   template<typename _Tp>
@@ -1282,19 +1286,58 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : public __is_nt_move_assignable_impl<_Tp>
     { };
 
-  /// is_trivially_constructible (still unimplemented)
+  /// is_trivially_constructible
+  template<typename _Tp, typename... _Args>
+    struct is_trivially_constructible
+    : public __and_<is_constructible<_Tp, _Args...>, integral_constant<bool,
+                       __is_trivially_constructible(_Tp, _Args...)>>::type
+    { };
   
-  /// is_trivially_default_constructible (still unimplemented)
-
-  /// is_trivially_copy_constructible (still unimplemented)
+  /// is_trivially_default_constructible
+  template<typename _Tp>
+    struct is_trivially_default_constructible
+    : public is_trivially_constructible<_Tp>::type
+    { };
 
-  /// is_trivially_move_constructible (still unimplemented)
+  /// is_trivially_copy_constructible
+  template<typename _Tp>
+    struct is_trivially_copy_constructible
+    : public __and_<is_copy_constructible<_Tp>, 
+                   integral_constant<bool,
+                       __is_trivially_constructible(_Tp, const _Tp&)>>::type
+    { };
+  
+  /// is_trivially_move_constructible
+  template<typename _Tp>
+    struct is_trivially_move_constructible
+    : public __and_<is_move_constructible<_Tp>, 
+                   integral_constant<bool,
+                       __is_trivially_constructible(_Tp, _Tp&&)>>::type
+    { };
 
-  /// is_trivially_assignable (still unimplemented)
+  /// is_trivially_assignable
+  template<typename _Tp, typename _Up>
+    struct is_trivially_assignable
+    : public __and_<is_assignable<_Tp, _Up>, 
+                   integral_constant<bool,
+                       __is_trivially_assignable(_Tp, _Up)>>::type
+    { };
 
-  /// is_trivially_copy_assignable (still unimplemented)
+  /// is_trivially_copy_assignable
+  template<typename _Tp>
+    struct is_trivially_copy_assignable
+    : public __and_<is_copy_assignable<_Tp>, 
+                   integral_constant<bool,
+                       __is_trivially_assignable(_Tp&, const _Tp&)>>::type
+    { };
 
-  /// is_trivially_move_assignable (still unimplemented)
+  /// is_trivially_move_assignable
+  template<typename _Tp>
+    struct is_trivially_move_assignable
+    : public __and_<is_move_assignable<_Tp>, 
+                   integral_constant<bool,
+                       __is_trivially_assignable(_Tp&, _Tp&&)>>::type
+    { };
 
   /// is_trivially_destructible
   template<typename _Tp>
index 2d03f4f68db592c3be35eb76678a994d4e1e1719..fe7305c040d63e1309cf985477b19806efcd45a9 100644 (file)
@@ -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 *-*-* } 2099 }
+// { dg-error "static assertion failed" "" { target *-*-* } 2142 }
 
 #include <utility>
 
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_assignable/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..1c5b803
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_assignable<test_type, test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_assignable/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..517b4f0
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_assignable<int, int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_assignable/value.cc
new file mode 100644 (file)
index 0000000..27fa643
--- /dev/null
@@ -0,0 +1,135 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCAssign
+{
+  HasTemplateCAssign& operator=(const HasTemplateCAssign&) = default;
+  template <class T>
+  HasTemplateCAssign& operator=(T&&);
+};
+
+struct MoveOnly
+{
+  MoveOnly& operator=(MoveOnly&&) = default;
+};
+
+struct MoveOnly2
+{
+  MoveOnly2& operator=(MoveOnly2&&) = delete;
+};
+
+void test01()
+{
+  using std::is_trivially_assignable;
+  using namespace __gnu_test;
+
+  static_assert(test_property<is_trivially_assignable, 
+               int, int>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               int&, int>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               int&, int&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               int&, int&&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               int&, const int&>(true), "");
+
+  static_assert(test_property<is_trivially_assignable, 
+               TType, TType>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               TType&, TType>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               TType&, TType&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               TType&, TType&&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               TType&, const TType&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               PODType, PODType>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               NType&, NType&>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               SLType, SLType>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::Empty, assign::Empty>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::Abstract, assign::Abstract>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::Ellipsis, assign::Ellipsis>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::DelEllipsis, assign::DelEllipsis>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::Any, assign::Any>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::DelDef, assign::DelDef>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::DelCopy, assign::DelCopy>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::Nontrivial, assign::Nontrivial>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::AnyAssign, assign::AnyAssign>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::DelAnyAssign, assign::DelAnyAssign>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::DelCopyAssign, assign::DelCopyAssign>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::MO, assign::MO>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::MO, assign::MO&&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::MO, assign::MO&>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               assign::MO, const assign::MO&>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               CopyConsOnlyType, CopyConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               CopyConsOnlyType, const CopyConsOnlyType&>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               MoveConsOnlyType, MoveConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               MoveConsOnlyType, MoveConsOnlyType&&>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               HasTemplateCAssign, HasTemplateCAssign>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               HasTemplateCAssign, const HasTemplateCAssign&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               ClassType, DerivedType>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               ClassType, DerivedType&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               ClassType, DerivedType&&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               ClassType, const DerivedType&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               MoveOnly, MoveOnly>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               MoveOnly, MoveOnly&&>(true), "");
+  static_assert(test_property<is_trivially_assignable, 
+               MoveOnly, MoveOnly&>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               MoveOnly, const MoveOnly&>(false), "");
+  static_assert(test_property<is_trivially_assignable, 
+               MoveOnly2, MoveOnly2>(false), "");
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_constructible/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_constructible/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..e7cff0f
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_constructible<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_constructible/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_constructible/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..85ba7f6
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_constructible<int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_constructible/value.cc
new file mode 100644 (file)
index 0000000..84fae3d
--- /dev/null
@@ -0,0 +1,168 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCCtor
+{
+  HasTemplateCCtor(const HasTemplateCCtor&) = default;
+  template <class T>
+  HasTemplateCCtor(T&&);
+};
+
+struct MoveOnly
+{
+  MoveOnly(MoveOnly&&) = default;
+};
+
+struct MoveOnly2
+{
+  MoveOnly2(MoveOnly2&&) = delete;
+};
+
+void test01()
+{
+  using std::is_trivially_constructible;
+  using namespace __gnu_test;
+
+  static_assert(test_property<is_trivially_constructible, 
+               int>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               int, int>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               int, int&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               int, int&&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               int, const int&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PolymorphicClass>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PolymorphicClass, PolymorphicClass>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PolymorphicClass, PolymorphicClass&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PolymorphicClass, PolymorphicClass&&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PolymorphicClass, const PolymorphicClass&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               TType>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               TType, TType>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               TType, TType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               TType, TType&&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               TType, const TType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               TType, int, int>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PODType>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PODType, PODType>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PODType, PODType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PODType, PODType&&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PODType, const PODType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               PODType, int, int>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               NType>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               SLType>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               LType>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               LType, int>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::DelDef>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::Abstract>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::Ellipsis>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::DelEllipsis>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::Any>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::DelCopy>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::DelCopy, const construct::DelCopy&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::DelDtor>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::Nontrivial>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               construct::UnusualCopy>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               CopyConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               CopyConsOnlyType, CopyConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               CopyConsOnlyType, CopyConsOnlyType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               CopyConsOnlyType, CopyConsOnlyType&&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               CopyConsOnlyType, const CopyConsOnlyType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveConsOnlyType, MoveConsOnlyType>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveConsOnlyType, MoveConsOnlyType&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveConsOnlyType, MoveConsOnlyType&&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveConsOnlyType, const MoveConsOnlyType&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               ClassType, DerivedType>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               ClassType, DerivedType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               ClassType, DerivedType&&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               ClassType, const DerivedType&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               HasTemplateCCtor>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               HasTemplateCCtor, HasTemplateCCtor>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               HasTemplateCCtor, const HasTemplateCCtor&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveOnly>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveOnly, MoveOnly>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveOnly, MoveOnly&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveOnly, MoveOnly&&>(true), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveOnly, const MoveOnly&>(false), "");
+  static_assert(test_property<is_trivially_constructible, 
+               MoveOnly2>(false), "");
+
+
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..3d7dce9
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_copy_assignable<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..2544dd5
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_copy_assignable<int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copy_assignable/value.cc
new file mode 100644 (file)
index 0000000..10e6198
--- /dev/null
@@ -0,0 +1,92 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCAssign
+{
+  HasTemplateCAssign& operator=(const HasTemplateCAssign&) = default;
+  template <class T>
+  HasTemplateCAssign& operator=(T&&);
+};
+
+struct MoveOnly
+{
+  MoveOnly& operator=(MoveOnly&&) = default;
+};
+
+struct MoveOnly2
+{
+  MoveOnly2& operator=(MoveOnly2&&) = delete;
+};
+
+void test01()
+{
+  using std::is_trivially_copy_assignable;
+  using namespace __gnu_test;
+
+  static_assert(test_property<is_trivially_copy_assignable, 
+               int>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               TType>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               PODType>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               NType>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               SLType>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::Empty>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::Abstract>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::Ellipsis>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::DelEllipsis>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::Any>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::DelDef>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::DelCopy>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::Nontrivial>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::AnyAssign>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::DelAnyAssign>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::DelCopyAssign>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               assign::MO>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               CopyConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               MoveConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               HasTemplateCAssign>(true), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               MoveOnly>(false), "");
+  static_assert(test_property<is_trivially_copy_assignable, 
+               MoveOnly2>(false), "");
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..11b76af
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_copy_constructible<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..477488d
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_copy_constructible<int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copy_constructible/value.cc
new file mode 100644 (file)
index 0000000..1822106
--- /dev/null
@@ -0,0 +1,86 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCCtor
+{
+  HasTemplateCCtor(const HasTemplateCCtor&) = default;
+  template <class T>
+  HasTemplateCCtor(T&&);
+};
+
+struct MoveOnly
+{
+  MoveOnly(MoveOnly&&) = default;
+};
+
+struct MoveOnly2
+{
+  MoveOnly2(MoveOnly2&&) = delete;
+};
+
+void test01()
+{
+  using std::is_trivially_copy_constructible;
+  using namespace __gnu_test;
+
+  static_assert(test_property<is_trivially_copy_constructible, 
+               int>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               TType>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               PODType>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               NType>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               SLType>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::DelDef>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::Abstract>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::Ellipsis>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::DelEllipsis>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::Any>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::DelCopy>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::DelDtor>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::Nontrivial>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               construct::UnusualCopy>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               CopyConsOnlyType>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               MoveConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               HasTemplateCCtor>(true), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               MoveOnly>(false), "");
+  static_assert(test_property<is_trivially_copy_constructible, 
+               MoveOnly2>(false), "");
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copyable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copyable/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..1e3e52b
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_copyable<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copyable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copyable/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..01f3a04
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_copyable<int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_copyable/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_copyable/value.cc
new file mode 100644 (file)
index 0000000..c21a5c4
--- /dev/null
@@ -0,0 +1,86 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCCtor
+{
+  HasTemplateCCtor(const HasTemplateCCtor&) = default;
+  template <class T>
+  HasTemplateCCtor(T&&);
+};
+
+struct MoveOnly
+{
+  MoveOnly(MoveOnly&&) = default;
+};
+
+struct MoveOnly2
+{
+  MoveOnly2(MoveOnly2&&) = delete;
+};
+
+void test01()
+{
+  using std::is_trivially_copyable;
+  using namespace __gnu_test;
+
+  static_assert(test_property<is_trivially_copyable, 
+               int>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               TType>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               PODType>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               NType>(false), "");
+  static_assert(test_property<is_trivially_copyable, 
+               SLType>(false), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::DelDef>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::Abstract>(false), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::Ellipsis>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::DelEllipsis>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::Any>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::DelCopy>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::DelDtor>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::Nontrivial>(false), "");
+  static_assert(test_property<is_trivially_copyable, 
+               construct::UnusualCopy>(false), "");
+  static_assert(test_property<is_trivially_copyable, 
+               CopyConsOnlyType>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               MoveConsOnlyType>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               HasTemplateCCtor>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               MoveOnly>(true), "");
+  static_assert(test_property<is_trivially_copyable, 
+               MoveOnly2>(true), "");
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..fcfeef3
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_default_constructible<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..cc005c2
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_default_constructible<int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/value.cc
new file mode 100644 (file)
index 0000000..e785363
--- /dev/null
@@ -0,0 +1,66 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCtor
+{
+  HasTemplateCtor() = default;
+  template <class T>
+  HasTemplateCtor();
+};
+
+void test01()
+{
+  using std::is_trivially_default_constructible;
+  using namespace __gnu_test;
+
+  static_assert(test_category<is_trivially_default_constructible, 
+               int>(true), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               TType>(true), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               PODType>(true), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               NType>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               SLType>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::DelDef>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::Abstract>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::Ellipsis>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::DelEllipsis>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::Any>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::DelCopy>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::DelDtor>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               construct::Nontrivial>(false), "");
+  static_assert(test_category<is_trivially_default_constructible, 
+               HasTemplateCtor>(true), "");
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..c2b6e83
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_move_assignable<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..5943b86
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_move_assignable<int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_move_assignable/value.cc
new file mode 100644 (file)
index 0000000..f96a167
--- /dev/null
@@ -0,0 +1,92 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCAssign
+{
+  HasTemplateCAssign& operator=(const HasTemplateCAssign&) = default;
+  template <class T>
+  HasTemplateCAssign& operator=(T&&);
+};
+
+struct MoveOnly
+{
+  MoveOnly& operator=(MoveOnly&&) = default;
+};
+
+struct MoveOnly2
+{
+  MoveOnly2& operator=(MoveOnly2&&) = delete;
+};
+
+void test01()
+{
+  using std::is_trivially_move_assignable;
+  using namespace __gnu_test;
+
+  static_assert(test_property<is_trivially_move_assignable, 
+               int>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               TType>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               PODType>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               NType>(false), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               SLType>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::Empty>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::Abstract>(false), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::Ellipsis>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::DelEllipsis>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::Any>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::DelDef>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::DelCopy>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::Nontrivial>(false), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::AnyAssign>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::DelAnyAssign>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::DelCopyAssign>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               assign::MO>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               CopyConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               MoveConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               HasTemplateCAssign>(false), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               MoveOnly>(true), "");
+  static_assert(test_property<is_trivially_move_assignable, 
+               MoveOnly2>(false), "");
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/requirements/explicit_instantiation.cc
new file mode 100644 (file)
index 0000000..5d2b135
--- /dev/null
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+  typedef short test_type;
+  template struct is_trivially_move_constructible<test_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/requirements/typedefs.cc
new file mode 100644 (file)
index 0000000..f9baae1
--- /dev/null
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// 
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+  // Check for required typedefs
+  typedef std::is_trivially_move_constructible<int> test_type;
+  typedef test_type::value_type               value_type;
+  typedef test_type::type                     type;
+  typedef test_type::type::value_type         type_value_type;
+  typedef test_type::type::type               type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/value.cc b/libstdc++-v3/testsuite/20_util/is_trivially_move_constructible/value.cc
new file mode 100644 (file)
index 0000000..da6493e
--- /dev/null
@@ -0,0 +1,86 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// 2014-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
+//
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+#include <testsuite_tr1.h>
+
+struct HasTemplateCCtor
+{
+  HasTemplateCCtor(const HasTemplateCCtor&) = default;
+  template <class T>
+  HasTemplateCCtor(T&&);
+};
+
+struct MoveOnly
+{
+  MoveOnly(MoveOnly&&) = default;
+};
+
+struct MoveOnly2
+{
+  MoveOnly2(MoveOnly2&&) = delete;
+};
+
+void test01()
+{
+  using std::is_trivially_move_constructible;
+  using namespace __gnu_test;
+
+  static_assert(test_property<is_trivially_move_constructible, 
+               int>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               TType>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               PODType>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               NType>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               SLType>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::DelDef>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::Abstract>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::Ellipsis>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::DelEllipsis>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::Any>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::DelCopy>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::DelDtor>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::Nontrivial>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               construct::UnusualCopy>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               CopyConsOnlyType>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               MoveConsOnlyType>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               HasTemplateCCtor>(false), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               MoveOnly>(true), "");
+  static_assert(test_property<is_trivially_move_constructible, 
+               MoveOnly2>(false), "");
+}
index eaad899b05fb1faa070381c8a602a62b312975a8..28ee98a3e1a060af26d6c3e6d6e0a477e9f5f7b3 100644 (file)
@@ -48,5 +48,5 @@ void test01()
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1764 }
-// { dg-error "declaration of" "" { target *-*-* } 1728 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1807 }
+// { dg-error "declaration of" "" { target *-*-* } 1771 }
index 40811a858b74b1c11db079f8d8b5005c33301fac..3fc1874027fdeb185721e1b3a5d36ec507d4a15d 100644 (file)
@@ -48,5 +48,5 @@ void test01()
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1667 }
-// { dg-error "declaration of" "" { target *-*-* } 1631 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1710 }
+// { dg-error "declaration of" "" { target *-*-* } 1674 }