]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Revert the last 4 commits. git-svn is stupid
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Aug 2013 23:03:00 +0000 (23:03 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Aug 2013 23:03:00 +0000 (23:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@30214 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp
deal.II/include/deal.II/dofs/dof_handler.h
deal.II/include/deal.II/grid/tria_accessor.h
deal.II/source/base/logstream.cc
deal.II/source/numerics/data_out.inst.in

index 50496b50df22bb8358ddf8c227011c0c5e399871..3e2357b8e863c1d5a2183446e2b1f71e6110be97 100644 (file)
 #include <boost/smart_ptr/bad_weak_ptr.hpp>
 #include <boost/utility/swap.hpp>
 
+#if !defined(BOOST_INTEL_STDCXX0X)
+namespace std
+{
+  template<typename T> class shared_ptr;
+  template<typename T> class weak_ptr;
+}
+#endif
+
 namespace boost
 {
   template<typename T> class shared_ptr;
@@ -31,20 +39,10 @@ namespace boost
     {
       typedef boost::shared_ptr<T> shared_type;
     };
-
-// Workaround for a bug in boost:
-// https://svn.boost.org/trac/boost/ticket/6655
-//
-// It should be save to depend on DEAL macros at this point as this header
-// should only be used by deal.II and dependend projects...
-//
-// - Maier, 2013
-#ifdef DEAL_II_CAN_USE_CXX11
     template<typename T> struct weak_ptr_traits<std::weak_ptr<T> >
     {
       typedef std::shared_ptr<T> shared_type;
     };
-#endif
 
     template<typename SharedPtr> struct shared_ptr_traits
     {};
@@ -53,13 +51,10 @@ namespace boost
     {
       typedef boost::weak_ptr<T> weak_type;
     };
-// as above
-#ifdef DEAL_II_CAN_USE_CXX11
     template<typename T> struct shared_ptr_traits<std::shared_ptr<T> >
     {
       typedef std::weak_ptr<T> weak_type;
     };
-#endif
 
     namespace detail
     {
index 93d765a67071ac2145f96913c1ff29c77c897eca..9e990e154e8538055504cc79ffae30ce64bd28cf 100644 (file)
@@ -23,7 +23,6 @@
 #include <deal.II/base/exceptions.h>
 #include <deal.II/base/smartpointer.h>
 #include <deal.II/base/index_set.h>
-#include <deal.II/base/std_cxx1x/shared_ptr.h>
 #include <deal.II/dofs/block_info.h>
 #include <deal.II/dofs/dof_iterator_selector.h>
 #include <deal.II/dofs/number_cache.h>
index 7ff6297f2cf46c040cc5a56280ec0345b2b86e62..e0524d229185cf8487dab551b2bb97c251ffa530 100644 (file)
 #include <deal.II/grid/tria_iterator_selector.h>
 #include <deal.II/grid/cell_id.h>
 
-#include <utility>
 
+namespace std
+{
+  template<class T1, class T2>
+  struct pair;
+}
 
 DEAL_II_NAMESPACE_OPEN
 
index e05f28a89bb977eddf9ed352400bcd1d5f653344..ba7f8773f35290d9948b6518ba1cbf0d0c167966 100644 (file)
@@ -137,65 +137,23 @@ LogStream::operator<< (std::ostream& (*p) (std::ostream &))
   // Print to the internal stringstream:
   stream << p;
 
-
-  // This is a bloody hack until LogStream got reimplemented as a proper
-  // child of std::streambuf (or similar).
-  //
-  // The problem is that at this point we would like to know whether an
-  // std::flush or std::endl has called us, however, there is no way to
-  // detect this in a sane manner.
-  //
-  // The obvious idea to compare function pointers,
-  //   std::ostream & (* const p_flush) (std::ostream &) = &std::flush;
-  //   p == p_flush ? ...,
-  // is wrong as there doesn't has to be a _single_ std::flush instance...
-  // there could be multiple of it. And in fact, LLVM's libc++ implements
-  // std::flush and std::endl in a way that every shared library and
-  // executable has its local copy... fun...
-  //
-  // - Maier, 2013
-
-  class QueryStreambuf : public std::streambuf
-  {
-    // Implement a minimalistic stream buffer that only stores the fact
-    // whether overflow or sync was called
-    public:
-      QueryStreambuf()
-        : _flushed(false), _newline_written(false)
-      {
-      }
-      bool flushed() { return _flushed; }
-      bool newline_written() { return _newline_written; }
-    private:
-      int_type overflow(int_type ch)
-        {
-          _newline_written = true;
-          return ch;
-        }
-      int sync()
-        {
-          _flushed = true;
-          return 0;
-        }
-      bool _flushed;
-      bool _newline_written;
-  } query_streambuf;
-
-  {
-    // and initialize an ostream with this streambuf:
-    std::ostream inject (&query_streambuf);
-    inject << p;
-  }
-
-  if (query_streambuf.flushed())
+  // Next check whether this is the <tt>flush</tt> or <tt>endl</tt>
+  // manipulator, and if so print out the message.
+  std::ostream & (* const p_flush) (std::ostream &) = &std::flush;
+  std::ostream & (* const p_endl) (std::ostream &) = &std::endl;
+  if (p == p_flush || p == p_endl)
     {
       Threads::Mutex::ScopedLock lock(write_lock);
 
-      // Print the line head in case of a previous newline:
+      // Print the line head in case of a newline:
       if (at_newline)
         print_line_head();
 
-      at_newline = query_streambuf.newline_written();
+      if (p == p_flush)
+        at_newline = false;
+
+      if (p == p_endl)
+        at_newline = true;
 
       if (get_prefixes().size() <= std_depth)
         *std_out << stream.str();
@@ -203,7 +161,7 @@ LogStream::operator<< (std::ostream& (*p) (std::ostream &))
       if (file && (get_prefixes().size() <= file_depth))
         *file << stream.str() << std::flush;
 
-      // Start a new string:
+      // Start a new string
       stream.str("");
     }
 
index 8df3e2b0d6db6611b2035efd3e5f84b6d179f9e3..87d0fd95c5bf54cce6fb3d4c31ebdeae0883e1a4 100644 (file)
@@ -363,8 +363,8 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS)
   namespace internal \{
     namespace DataOut \{
 #if deal_II_dimension <= deal_II_space_dimension
-      template struct  ParallelDataBase<deal_II_dimension,deal_II_space_dimension>;
-      template struct ParallelData<deal_II_dimension,deal_II_space_dimension>;
+      template class ParallelDataBase<deal_II_dimension,deal_II_space_dimension>;
+      template class ParallelData<deal_II_dimension,deal_II_space_dimension>;
 #endif
     \}
   \}

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.