File indexing completed on 2025-11-03 09:27:27
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 #ifndef BOOST_LOG_UTILITY_FUNCTIONAL_BEGINS_WITH_HPP_INCLUDED_
0016 #define BOOST_LOG_UTILITY_FUNCTIONAL_BEGINS_WITH_HPP_INCLUDED_
0017 
0018 #include <boost/log/detail/config.hpp>
0019 #include <boost/log/detail/header.hpp>
0020 
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024 
0025 namespace boost {
0026 
0027 BOOST_LOG_OPEN_NAMESPACE
0028 
0029 
0030 struct begins_with_fun
0031 {
0032     typedef bool result_type;
0033 
0034     template< typename T, typename U >
0035     bool operator() (T const& left, U const& right) const
0036     {
0037         typedef typename T::const_iterator left_iterator;
0038         typedef typename U::const_iterator right_iterator;
0039 
0040         left_iterator left_it = left.begin(), left_end = left.end();
0041         right_iterator right_it = right.begin(), right_end = right.end();
0042         for (; left_it != left_end && right_it != right_end; ++left_it, ++right_it)
0043         {
0044             if (*left_it != *right_it)
0045                 break;
0046         }
0047         return right_it == right_end;
0048     }
0049 };
0050 
0051 BOOST_LOG_CLOSE_NAMESPACE 
0052 
0053 } 
0054 
0055 #include <boost/log/detail/footer.hpp>
0056 
0057 #endif