MCPcopy Create free account
hub / github.com/ablab/spades / equals

Function equals

ext/include/boost/algorithm/string/predicate.hpp:285–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 */
284 template<typename Range1T, typename Range2T, typename PredicateT>
285 inline bool equals(
286 const Range1T& Input,
287 const Range2T& Test,
288 PredicateT Comp)
289 {
290 iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range1T>::type> lit_input(::boost::as_literal(Input));
291 iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range2T>::type> lit_test(::boost::as_literal(Test));
292
293 typedef BOOST_STRING_TYPENAME
294 range_const_iterator<Range1T>::type Iterator1T;
295 typedef BOOST_STRING_TYPENAME
296 range_const_iterator<Range2T>::type Iterator2T;
297
298 Iterator1T InputEnd=::boost::end(lit_input);
299 Iterator2T TestEnd=::boost::end(lit_test);
300
301 Iterator1T it=::boost::begin(lit_input);
302 Iterator2T pit=::boost::begin(lit_test);
303 for(;
304 it!=InputEnd && pit!=TestEnd;
305 ++it,++pit)
306 {
307 if( !(Comp(*it,*pit)) )
308 return false;
309 }
310
311 return (pit==TestEnd) && (it==InputEnd);
312 }
313
314 //! 'Equals' predicate
315 /*!

Callers 1

iequalsFunction · 0.70

Calls 5

as_literalFunction · 0.85
CompClass · 0.85
is_equalClass · 0.85
endClass · 0.50
beginClass · 0.50

Tested by

no test coverage detected