From: g0dil Date: Wed, 12 Nov 2008 09:38:23 +0000 (+0000) Subject: PPI: Fix boost compatibility issues X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=38863ce7cf677eb69a98a3fd96bd44dea3509e9a;p=senf.git PPI: Fix boost compatibility issues git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@955 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/AnnotationRouter.ct b/PPI/AnnotationRouter.ct index e334214..bef2f9c 100644 --- a/PPI/AnnotationRouter.ct +++ b/PPI/AnnotationRouter.ct @@ -45,8 +45,16 @@ senf::ppi::module::AnnotationRouter::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 >( + new connector::ActiveOutput<>())).first->second; +#else AnnotationType k (key); return *outputs_.insert(k, new connector::ActiveOutput<>()).first; +#endif } template @@ -56,8 +64,13 @@ prefix_ void senf::ppi::module::AnnotationRouter::request() typename Outputs::iterator i (outputs_.find(p.annotation())); 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 e9ae21b..47e3d9f 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