diff --git a/alib2algo/src/automaton/run/Run.h b/alib2algo/src/automaton/run/Run.h index 1c96c999fb13ba281b10a8c316cfa6f1aaa8c54c..90b1baa15e1b28797539ef4ea6ebfbda4b2e6a86 100644 --- a/alib2algo/src/automaton/run/Run.h +++ b/alib2algo/src/automaton/run/Run.h @@ -297,7 +297,7 @@ std::tuple < bool, StateType, std::set < unsigned >, std::deque < PushdownStoreS for ( unsigned j = 0; j < operation.first.size ( ); j++ ) pushdownStore.pop_back ( ); - for ( const auto & push : std::make_reverse ( operation.second ) ) pushdownStore.push_back ( push ); + for ( const auto & push : ext::make_reverse ( operation.second ) ) pushdownStore.push_back ( push ); state = transition->second; i++; @@ -501,7 +501,7 @@ std::tuple < bool, StateType, std::set < unsigned >, std::deque < PushdownStoreS for ( unsigned j = 0; j < std::get < 2 > ( transition->first ).size ( ); j++ ) pushdownStore.pop_back ( ); - for ( const auto & symbol : std::make_reverse ( transition->second.second ) ) pushdownStore.push_back ( symbol ); + for ( const auto & symbol : ext::make_reverse ( transition->second.second ) ) pushdownStore.push_back ( symbol ); state = transition->second.first; @@ -590,7 +590,7 @@ std::tuple < bool, std::set < StateType >, std::set < std::vector < OutputSymbol stackNodeCopy = stackNodeCopy -> m_parent; } if ( j == pop . size () ) { - for ( const auto & elem : std::make_reverse ( std::get<1>(transition . second ) ) ) { + for ( const auto & elem : ext::make_reverse ( std::get<1>(transition . second ) ) ) { stackNodeCopy = std::make_shared < graphStructuredStack < InputSymbolType > > ( stackNodeCopy, elem ); } for ( const auto & elem : std::get<2>(transition . second) ) { diff --git a/alib2algo/src/automaton/transform/PDAToRHPDA.cpp b/alib2algo/src/automaton/transform/PDAToRHPDA.cpp index c706b7719f679bc6a85ef369095127d517160d3f..b792aa553b4b73904d9d5a29ecaccb09dadc66a2 100644 --- a/alib2algo/src/automaton/transform/PDAToRHPDA.cpp +++ b/alib2algo/src/automaton/transform/PDAToRHPDA.cpp @@ -89,7 +89,7 @@ automaton::RealTimeHeightDeterministicDPDA < > PDAToRHPDA::convert ( const autom popPushIndex++; } - for ( const DefaultSymbolType & push : std::make_reverse ( to.second ) ) { + for ( const DefaultSymbolType & push : ext::make_reverse ( to.second ) ) { DefaultStateType fromState = ( popPushIndex == 0 ) ? std::get < 0 > ( transition.first ) : lastUS; if ( popPushIndex != 0 ) lastUS = common::createUnique ( DefaultStateType ( us + ext::to_string ( ++i ) ), res.getStates ( ) ); diff --git a/alib2algo/src/regexp/glushkov/GlushkovLast.h b/alib2algo/src/regexp/glushkov/GlushkovLast.h index cf71bfa501e13b98860cdefbda7227a4f6c2fc44..643d3362eed75631d8dbed6182320b2dd4238904 100644 --- a/alib2algo/src/regexp/glushkov/GlushkovLast.h +++ b/alib2algo/src/regexp/glushkov/GlushkovLast.h @@ -72,7 +72,7 @@ template < class SymbolType > std::set < regexp::UnboundedRegExpSymbol < SymbolType > > GlushkovLast::Unbounded < SymbolType >::visit ( const regexp::UnboundedRegExpConcatenation < SymbolType > & node ) { std::set < regexp::UnboundedRegExpSymbol < SymbolType > > ret; - for ( const auto & element : std::make_reverse ( node.getElements ( ) ) ) { + for ( const auto & element : ext::make_reverse ( node.getElements ( ) ) ) { std::set < regexp::UnboundedRegExpSymbol < SymbolType > > tmp = element->template accept < std::set < regexp::UnboundedRegExpSymbol < SymbolType > >, GlushkovLast::Unbounded < SymbolType > > ( ); ret.insert ( tmp.begin ( ), tmp.end ( ) ); diff --git a/alib2std/src/extensions/forward_tree.hpp b/alib2std/src/extensions/forward_tree.hpp index e357706d68855ad7b6c379cdc346c6071f482590..41e031f7dc4a4c529aa2861f7f5d4ec5b36e6b2c 100644 --- a/alib2std/src/extensions/forward_tree.hpp +++ b/alib2std/src/extensions/forward_tree.hpp @@ -371,7 +371,7 @@ public: forward_tree ( T && data, Types ... subtrees ) : forward_tree ( std::move ( data ), std::vector < forward_tree > { subtrees ... } ) { } - template < typename Iterator, typename std::enable_if < std::is_iterator < Iterator >::value >::type > + template < typename Iterator, typename std::enable_if < ext::is_iterator < Iterator >::value >::type > forward_tree ( const T & data, Iterator begin, Iterator end ) : forward_tree ( data, fromIterator ( begin, end ) ) { } diff --git a/alib2std/src/extensions/iterator.hpp b/alib2std/src/extensions/iterator.hpp index 446454fcf54a6d352db2734a9ae83d092cf6ab3d..46694aaa0709bcdfa4c1c0e21de984c7af6c1fd8 100644 --- a/alib2std/src/extensions/iterator.hpp +++ b/alib2std/src/extensions/iterator.hpp @@ -10,7 +10,7 @@ #include <iterator> -namespace std { +namespace ext { template<class T> class reverser { @@ -40,6 +40,6 @@ struct is_iterator : std::false_type {}; template < typename T > struct is_iterator<typename std::iterator_traits<T>> : std::true_type {}; -} /* namespace std */ +} /* namespace ext */ #endif /* __ITERATOR_HPP_ */ diff --git a/alib2std/src/extensions/tree.hpp b/alib2std/src/extensions/tree.hpp index 81e568df4173f00bbaa063d56cc37ba7f5fea82a..02a758b0003003cccaabab2abd92ac69a2a5a4bd 100644 --- a/alib2std/src/extensions/tree.hpp +++ b/alib2std/src/extensions/tree.hpp @@ -379,7 +379,7 @@ public: tree ( T && data, Types ... subtrees ) : tree ( std::move ( data ), std::vector < tree > { subtrees ... } ) { } - template < typename Iterator, typename std::enable_if < std::is_iterator < Iterator >::value >::type > + template < typename Iterator, typename std::enable_if < ext::is_iterator < Iterator >::value >::type > tree ( const T & data, Iterator begin, Iterator end ) : tree ( data, fromIterator ( begin, end ) ) { }