MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / equals

Function equals

include/win/boost/algorithm/string/predicate.hpp:284–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

iequalsFunction · 0.70

Calls 4

is_equalClass · 0.85
as_literalFunction · 0.50
endFunction · 0.50
beginFunction · 0.50

Tested by

no test coverage detected