3 // Copyright Thorsten Ottosen 2003-2004. Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // For more information, see http://www.boost.org/libs/range/
10 #include <boost/range/adaptor/tokenized.hpp>
11 #include <boost/range/algorithm_ext/push_back.hpp>
12 #include <boost/assert.hpp>
17 int main(int argc, const char* argv[])
19 using namespace boost::adaptors;
21 std::string input = " a b c d e f g hijklmnopqrstuvwxyz";
22 std::vector< boost::sub_match< std::string::iterator > > result;
23 boost::push_back(result, input | tokenized(boost::regex("\\b")));
25 BOOST_ASSERT( boost::size(result) == 16u );