]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/19_diagnostics/stdexcept.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 19_diagnostics / stdexcept.cc
index 46da10bfb3b661b1c87e5ffe7d417545bebab6d4..aee1cd32383ba5463155bedeb25aed5847c76cf6 100644 (file)
@@ -1,6 +1,6 @@
 // 2011-03-16 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2011-2016 Free Software Foundation, Inc.
+// Copyright (C) 2011-2024 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
@@ -219,9 +219,37 @@ void test02()
     }
 }
 
+void test03()
+{
+  std::logic_error le1("");
+  // Copy constructor:
+  std::logic_error le2(le1);
+  // Copy assignment operator:
+  le1 = le2;
+#if __cplusplus >= 201103L
+  // Move constructor:
+  std::logic_error le3 = std::move(le1);
+  // Move assignment operator:
+  le1 = std::move(le3);
+#endif
+
+  std::runtime_error re1("");
+  // Copy constructor:
+  std::runtime_error re2(re1);
+  // Copy assignment operator:
+  re1 = re2;
+#if __cplusplus >= 201103L
+  // Move constructor:
+  std::runtime_error re3 = std::move(re1);
+  // Move assignment operator:
+  re1 = std::move(re3);
+#endif
+}
+
 int main(void)
 {
   test01();
   test02();
+  test03();
   return 0;
 }