dissect formatter and tests added

[SVN r68124]
This commit is contained in:
Pavol Droba
2011-01-13 21:21:37 +00:00
parent 823b199df3
commit 9d25072f2f
3 changed files with 66 additions and 3 deletions

View File

@ -87,6 +87,31 @@ namespace boost {
}
};
// dissect format functor ----------------------------------------------------//
// dissect format functor
template<typename FinderT>
struct dissect_formatF
{
public:
// Construction
dissect_formatF(FinderT Finder) :
m_Finder(Finder) {}
// Operation
template<typename RangeT>
inline iterator_range<
BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
operator()(const RangeT& Replace) const
{
return m_Finder(::boost::begin(Replace), ::boost::end(Replace));
}
private:
FinderT m_Finder;
};
} // namespace detail
} // namespace algorithm
} // namespace boost