File modernize-boost.diff of Package permlib

From: Jan Engelhardt <jengelh@inai.de>
Date: 2019-03-17 18:21:06.508517390 +0100

There seems to be no boost::next in 1.69 anymore that I can find.
Replace with std::next, which mandates C++11.

---
 CMakeLists.txt                                 |    4 ++--
 include/permlib/abstract_bsgs.h                |    2 +-
 include/permlib/bsgs.h                         |    2 +-
 include/permlib/change/base_transpose.h        |    2 +-
 include/permlib/generator/schreier_generator.h |    2 +-
 include/permlib/test/primitivity_sgs_test.h    |    2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

Index: PermLib-0.2.9/CMakeLists.txt
===================================================================
--- PermLib-0.2.9.orig/CMakeLists.txt
+++ PermLib-0.2.9/CMakeLists.txt
@@ -15,11 +15,11 @@ IF( NOT CMAKE_BUILD_TYPE )
              FORCE )
 ENDIF( NOT CMAKE_BUILD_TYPE )
 
-add_definitions(-Wall -Woverloaded-virtual -ansi -pedantic -Wshadow)
+add_definitions(-Wall -Woverloaded-virtual)
 include_directories(${Boost_INCLUDE_DIRS})
 include_directories("${CMAKE_SOURCE_DIR}/include")
 
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -g -DBOOST_DISABLE_ASSERTS")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -DBOOST_DISABLE_ASSERTS")
 
 # add -DPERMLIB_DEBUG_OUTPUT flag for full debug output
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DPERMLIB_DEBUGMODE")
Index: PermLib-0.2.9/include/permlib/abstract_bsgs.h
===================================================================
--- PermLib-0.2.9.orig/include/permlib/abstract_bsgs.h
+++ PermLib-0.2.9/include/permlib/abstract_bsgs.h
@@ -136,7 +136,7 @@ AbstractPermutationGroup* AbstractBSGS<T
 	// start the search
 	boost::shared_ptr<PermutationGroup> stabilizer(new PermutationGroup(copy.n));
 	backtrackSearch.search(*stabilizer);
-	return new AbstractBSGS<TRANS>(stabilizer, m_support);
+	return new AbstractBSGS<TRANS>(stabilizer, m_support.get());
 }
 
 template <class TRANS>
Index: PermLib-0.2.9/include/permlib/bsgs.h
===================================================================
--- PermLib-0.2.9.orig/include/permlib/bsgs.h
+++ PermLib-0.2.9/include/permlib/bsgs.h
@@ -312,7 +312,7 @@ PERM BSGS<PERM, TRANS>::random(const int
     PERM g(this->n);
     for (int l = this->U.size()-1; l>=i ; --l) {
 		//std::cout << l << " : " << U[l] << " : " << U[l].size() << std::endl;
-        unsigned long beta = *(boost::next(this->U[l].begin(), randomInt(this->U[l].size())));
+        unsigned long beta = *std::next(this->U[l].begin(), randomInt(this->U[l].size()));
         boost::scoped_ptr<PERM> u_beta(this->U[l].at(beta));
         g *= *u_beta;
     }
Index: PermLib-0.2.9/include/permlib/change/base_transpose.h
===================================================================
--- PermLib-0.2.9.orig/include/permlib/change/base_transpose.h
+++ PermLib-0.2.9/include/permlib/change/base_transpose.h
@@ -139,7 +139,7 @@ void BaseTranspose<PERM,TRANS>::transpos
 	}
 	BOOST_ASSERT(U_i1.size() >= targetTransversalSize);
 
-	bsgs.S.insert(bsgs.S.end(), S_i1.begin(), boost::next(S_i1.begin(), m_statNewGenerators));
+	bsgs.S.insert(bsgs.S.end(), S_i1.begin(), std::next(S_i1.begin(), m_statNewGenerators));
 	U[i] = U_i;
 	U[i+1] = U_i1;
 }
Index: PermLib-0.2.9/include/permlib/generator/schreier_generator.h
===================================================================
--- PermLib-0.2.9.orig/include/permlib/generator/schreier_generator.h
+++ PermLib-0.2.9/include/permlib/generator/schreier_generator.h
@@ -168,7 +168,7 @@ bool SchreierGenerator<PERM, TRANS>::adv
 	++m_Scurrent;
 	++m_posS;
 	if (m_Scurrent == m_Send) {
-		m_Scurrent = boost::next(m_Sbegin, m_posSlimit);
+		m_Scurrent = std::next(m_Sbegin, m_posSlimit);
 		m_posS = m_posSlimit;
 		++m_Ucurrent;
 		++m_posU;
Index: PermLib-0.2.9/include/permlib/test/primitivity_sgs_test.h
===================================================================
--- PermLib-0.2.9.orig/include/permlib/test/primitivity_sgs_test.h
+++ PermLib-0.2.9/include/permlib/test/primitivity_sgs_test.h
@@ -167,7 +167,7 @@ bool PrimitivitySGSTest<TRANS>::blockOfI
 				}
 				PERMLIB_DEBUG( std::cout << " merge sets from i = " << muIndex << " with representative " << AllLambdas[largestReprIndex] << std::endl; )
 				
-				std::swap(AllLambdas[*boost::next(LambdaBegin.begin(), muIndex)], AllLambdas[largestReprIndex]);
+				std::swap(AllLambdas[*std::next(LambdaBegin.begin(), muIndex)], AllLambdas[largestReprIndex]);
 				for (dom_int i = LambdaBegin.size() - 1; i > muIndex ; --i) {
 					const unsigned int oldSize = LambdaSize.back();
 					LambdaSize.pop_back();
openSUSE Build Service is sponsored by