[shark] 17/58: fixed boost 1.60 problems. fixes #38

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Mar 16 10:05:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository shark.

commit bdb8965696bf864354028a1097957793a3cb99c9
Author: Oswin <oswin.krause at di.ku.dk>
Date:   Wed Feb 3 13:02:58 2016 +0100

    fixed boost 1.60 problems. fixes #38
---
 examples/EA/SOO/TSP.tpp                                        | 3 +++
 include/shark/Algorithms/Trainers/Distribution/NormalTrainer.h | 2 +-
 include/shark/Data/Csv.h                                       | 2 --
 include/shark/Data/Impl/BoostFusion151DefineStructInl.hpp      | 2 +-
 include/shark/Models/Kernels/SubrangeKernel.h                  | 2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/examples/EA/SOO/TSP.tpp b/examples/EA/SOO/TSP.tpp
index a1d404d..428bf09 100755
--- a/examples/EA/SOO/TSP.tpp
+++ b/examples/EA/SOO/TSP.tpp
@@ -52,6 +52,9 @@
 #include <shark/LinAlg/Base.h>
 
 #include <boost/format.hpp>
+#if BOOST_VERSION == 106000
+#include <boost/type_traits/ice.hpp>//Required because of boost 1.60 bug
+#endif
 #include <boost/graph/adjacency_matrix.hpp>
 #include <boost/graph/adjacency_list.hpp>
 #include <boost/graph/graphml.hpp>
diff --git a/include/shark/Algorithms/Trainers/Distribution/NormalTrainer.h b/include/shark/Algorithms/Trainers/Distribution/NormalTrainer.h
index f1e5cb5..772d9b7 100644
--- a/include/shark/Algorithms/Trainers/Distribution/NormalTrainer.h
+++ b/include/shark/Algorithms/Trainers/Distribution/NormalTrainer.h
@@ -73,7 +73,7 @@ public:
 		namespace bae = boost::accumulators::extract;
 
 		InternalAccumulatorType accu;
-		boost::range::for_each(input, boost::bind(boost::ref(accu), _1));
+		boost::range::for_each(input, boost::bind(boost::ref(accu), boost::placeholders::_1));
 		SIZE_CHECK(bae::count(accu) > 1u);
 
 		normal.mean(bae::mean(accu));
diff --git a/include/shark/Data/Csv.h b/include/shark/Data/Csv.h
index 70b9aa4..32298e4 100644
--- a/include/shark/Data/Csv.h
+++ b/include/shark/Data/Csv.h
@@ -48,9 +48,7 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/format.hpp>
-#include <boost/iostreams/copy.hpp>
 #include <boost/iostreams/filter/newline.hpp>
-#include <boost/iostreams/filtering_stream.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/type_traits.hpp>
 
diff --git a/include/shark/Data/Impl/BoostFusion151DefineStructInl.hpp b/include/shark/Data/Impl/BoostFusion151DefineStructInl.hpp
index f64c4f8..d768aec 100644
--- a/include/shark/Data/Impl/BoostFusion151DefineStructInl.hpp
+++ b/include/shark/Data/Impl/BoostFusion151DefineStructInl.hpp
@@ -48,7 +48,7 @@
 #include <boost/fusion/sequence/sequence_facade.hpp>
 #include <boost/fusion/iterator/iterator_facade.hpp>
 
-#if  (BOOST_VERSION % 100) < 4800
+#if  BOOST_VERSION < 104800
 #include "BoostFusionCopy.hpp"
 #else
 #include <boost/fusion/algorithm/auxiliary/copy.hpp>
diff --git a/include/shark/Models/Kernels/SubrangeKernel.h b/include/shark/Models/Kernels/SubrangeKernel.h
index 0513936..759b1f5 100644
--- a/include/shark/Models/Kernels/SubrangeKernel.h
+++ b/include/shark/Models/Kernels/SubrangeKernel.h
@@ -145,7 +145,7 @@ public:
 
 	template<class Kernels,class Ranges>
 	SubrangeKernelBase(Kernels const& kernels, Ranges const& ranges){
-		SIZE_CHECK(size(kernels) == size(ranges));
+		SIZE_CHECK(kernels.size() == ranges.size());
 		for(std::size_t i = 0; i != kernels.size(); ++i){
 			m_kernelWrappers.push_back(
 				SubrangeKernelWrapper<InputType>(get(kernels,i),get(ranges,i).first,get(ranges,i).second)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/shark.git



More information about the debian-science-commits mailing list