From: Wolfgang Bangerth Date: Sun, 9 Nov 2014 17:38:51 +0000 (-0600) Subject: Allow using the old std_cxx1x namespace. X-Git-Tag: v8.2.0-rc1~72^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05e39e1f0dbd9ba5e19a74771306fa99b7ad3214;p=dealii.git Allow using the old std_cxx1x namespace. 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. --- diff --git a/include/deal.II/base/std_cxx11/array.h b/include/deal.II/base/std_cxx11/array.h index 925d0e2e67..17917662ac 100644 --- a/include/deal.II/base/std_cxx11/array.h +++ b/include/deal.II/base/std_cxx11/array.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/bind.h b/include/deal.II/base/std_cxx11/bind.h index 8d1eef5dd0..7252b356d2 100644 --- a/include/deal.II/base/std_cxx11/bind.h +++ b/include/deal.II/base/std_cxx11/bind.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/condition_variable.h b/include/deal.II/base/std_cxx11/condition_variable.h index 76697a624d..fadd3d7a76 100644 --- a/include/deal.II/base/std_cxx11/condition_variable.h +++ b/include/deal.II/base/std_cxx11/condition_variable.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/function.h b/include/deal.II/base/std_cxx11/function.h index 201027cd42..a7b4592269 100644 --- a/include/deal.II/base/std_cxx11/function.h +++ b/include/deal.II/base/std_cxx11/function.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/mutex.h b/include/deal.II/base/std_cxx11/mutex.h index f1ecae6091..7cd0be4a5a 100644 --- a/include/deal.II/base/std_cxx11/mutex.h +++ b/include/deal.II/base/std_cxx11/mutex.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/shared_ptr.h b/include/deal.II/base/std_cxx11/shared_ptr.h index 24a159cb30..25fb3438b7 100644 --- a/include/deal.II/base/std_cxx11/shared_ptr.h +++ b/include/deal.II/base/std_cxx11/shared_ptr.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/thread.h b/include/deal.II/base/std_cxx11/thread.h index d472b46b51..61324320f8 100644 --- a/include/deal.II/base/std_cxx11/thread.h +++ b/include/deal.II/base/std_cxx11/thread.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/tuple.h b/include/deal.II/base/std_cxx11/tuple.h index 5e16c47b8a..7319b06fb7 100644 --- a/include/deal.II/base/std_cxx11/tuple.h +++ b/include/deal.II/base/std_cxx11/tuple.h @@ -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 diff --git a/include/deal.II/base/std_cxx11/type_traits.h b/include/deal.II/base/std_cxx11/type_traits.h index 23ddb5feeb..290dc02bd8 100644 --- a/include/deal.II/base/std_cxx11/type_traits.h +++ b/include/deal.II/base/std_cxx11/type_traits.h @@ -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 index 0000000000..91a7a12f7c --- /dev/null +++ b/tests/base/stdcxx1x_vs_stdcxx11.cc @@ -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 +#include +#include +#include +#include + + +int main () +{ + std::ofstream logfile("output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + std_cxx1x::shared_ptr 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 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/base/stdcxx1x_vs_stdcxx11.output @@ -0,0 +1,2 @@ + +DEAL::OK