From 829220028787185cbe96f25e3df858b736a02e26 Mon Sep 17 00:00:00 2001
From: g0dil <g0dil@wiback.org>
Date: Wed, 12 Nov 2008 09:38:23 +0000
Subject: [PATCH] PPI: Fix boost compatibility issues

---
 PPI/AnnotationRouter.ct | 15 ++++++++++++++-
 include/senf/Console    |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/PPI/AnnotationRouter.ct b/PPI/AnnotationRouter.ct
index e3342144f..bef2f9c48 100644
--- a/PPI/AnnotationRouter.ct
+++ b/PPI/AnnotationRouter.ct
@@ -45,8 +45,16 @@ senf::ppi::module::AnnotationRouter<AnnotationType>::newOutput(AnnotationType co
     if (outputs_.find(key) != outputs_.end())
         throw DuplicateKeyException(key); 
     // key must not be const ... has something to do with exception guarantees ??
+    // From boost 1.34.0 on we can use auto_ptr which we really should for exception safety
+    // but this doesn't work with boost 1.33.1 :-(
+#if BOOST_VERSION >= 103400
+    return *outputs_.insert(key, 
+                            std::auto_ptr<connector::ActiveOutput<> >(
+                                new connector::ActiveOutput<>())).first->second;
+#else
     AnnotationType k (key); 
     return *outputs_.insert(k, new connector::ActiveOutput<>()).first;
+#endif
 }
 
 template <class AnnotationType>
@@ -56,8 +64,13 @@ prefix_ void senf::ppi::module::AnnotationRouter<AnnotationType>::request()
     typename Outputs::iterator i (outputs_.find(p.annotation<AnnotationType>()));
     if (i == outputs_.end())
         defaultOutput(p);
-    else
+    else {
+#if BOOST_VERSION >= 103400
+        (*i->second)(p);
+#else
         (*i)(p);
+#endif
+    }
 }
 
 ///////////////////////////////ct.e////////////////////////////////////////
diff --git a/include/senf/Console b/include/senf/Console
index e9ae21bc4..47e3d9f75 120000
--- a/include/senf/Console
+++ b/include/senf/Console
@@ -1 +1 @@
-../../Console
\ No newline at end of file
+../../Scheduler/Console
\ No newline at end of file
-- 
GitLab