]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Allow using the old std_cxx1x namespace. 234/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 9 Nov 2014 17:38:51 +0000 (11:38 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 9 Nov 2014 17:38:51 +0000 (11:38 -0600)
This was supposed to work in a backward compatible way but I broke
it for everyone who didn't explicitly #included the old base/std_cxx1x/*h
headers but got stuff through indirect #includes.

include/deal.II/base/std_cxx11/array.h
include/deal.II/base/std_cxx11/bind.h
include/deal.II/base/std_cxx11/condition_variable.h
include/deal.II/base/std_cxx11/function.h
include/deal.II/base/std_cxx11/mutex.h
include/deal.II/base/std_cxx11/shared_ptr.h
include/deal.II/base/std_cxx11/thread.h
include/deal.II/base/std_cxx11/tuple.h
include/deal.II/base/std_cxx11/type_traits.h
tests/base/stdcxx1x_vs_stdcxx11.cc [new file with mode: 0644]
tests/base/stdcxx1x_vs_stdcxx11.output [new file with mode: 0644]

index 925d0e2e67e300dba9ecf713e08a345463f84006..17917662ac36660d37def9578d34a22ca7f46092 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2013 by the deal.II authors
+// Copyright (C) 2009 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -41,4 +41,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index 8d1eef5dd0845bcc04c53f5b444244a9aed227bc..7252b356d2ba8897e7742a24588048263c3185f2 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2013 by the deal.II authors
+// Copyright (C) 2009 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -66,4 +66,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index 76697a624da02e136175859f7a227b611a024fa8..fadd3d7a76c2f7aa5bc4962355840bfaaf07dfa1 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2013 by the deal.II authors
+// Copyright (C) 2009 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -45,4 +45,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index 201027cd42191bfa4bb40fcaf8ca8c4024bbde9a..a7b4592269e6ae8bf6f1bbbc3126097b06f7f820 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2013 by the deal.II authors
+// Copyright (C) 2009 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -41,4 +41,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index f1ecae609177fa835df7f899a955677e583a51b0..7cd0be4a5ab9f987a3cc519fad28bd8a26ef06ab 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2013 by the deal.II authors
+// Copyright (C) 2009 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -41,4 +41,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index 24a159cb305312b447b55d61951ff310a6d48a4d..25fb3438b7a3d4403584e7f9924624d6389f3d56 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2013 by the deal.II authors
+// Copyright (C) 2009 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -44,4 +44,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index d472b46b517868976069c1b10ba3b0a25cc54b63..61324320f86c1396238a8375e2394462c8864058 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2013 by the deal.II authors
+// Copyright (C) 2009 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -41,4 +41,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index 5e16c47b8ae3389c0175d2a9dc159811d0e51626..7319b06fb7ed50d14d4276a103150f0b0f7ef1c8 100644 (file)
@@ -64,4 +64,9 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index 23ddb5feeb4666bf96f2c3ed2c3f6efc1d7a8502..290dc02bd807806d3e0f78cf1b986045d1c6f9f4 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2012 - 2013 by the deal.II authors
+// Copyright (C) 2012 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -63,4 +63,10 @@ DEAL_II_NAMESPACE_CLOSE
 
 #endif
 
+
+// then allow using the old namespace name instead of the new one
+DEAL_II_NAMESPACE_OPEN
+namespace std_cxx1x = std_cxx11;
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
diff --git a/tests/base/stdcxx1x_vs_stdcxx11.cc b/tests/base/stdcxx1x_vs_stdcxx11.cc
new file mode 100644 (file)
index 0000000..91a7a12
--- /dev/null
@@ -0,0 +1,43 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2014 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// ensure that we can refer to symbols using the old namespace
+// std_cxx1x even if we only include the newer base/std_cxx11/*h
+// include files (e.g., if we use the old namespace name but don't
+// #include anything at all directly -- in which case we get things
+// from indirect #includes made in the library which only include
+// base/std_cxx11/*h)
+
+
+#include "../tests.h"
+#include <deal.II/base/std_cxx11/shared_ptr.h>
+#include <deal.II/base/logstream.h>
+#include <fstream>
+#include <cmath>
+#include <iomanip>
+
+
+int main ()
+{
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  std_cxx1x::shared_ptr<int> p;
+  deallog << "OK" << std::endl;
+}
+
diff --git a/tests/base/stdcxx1x_vs_stdcxx11.output b/tests/base/stdcxx1x_vs_stdcxx11.output
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.