<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Clang does not compile boost::adaptor::tokenized correctly."
href="http://llvm.org/bugs/show_bug.cgi?id=22023">22023</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang does not compile boost::adaptor::tokenized correctly.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>t-pasternak@o2.pl
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The code below compiled with clang-3.5 from Ubuntu repo, as well as 3.6.0
(218454) prints only newline symbols, while on GCC 4.8.2 and Visual Studio 2013
the ouput is correct.
// ==================================================================
#include <boost/range/adaptor/tokenized.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/assign.hpp>
#include <iterator>
#include <iostream>
#include <vector>
int main(int argc, const char* argv[])
{
using namespace boost::adaptors;
typedef boost::sub_match< std::string::iterator > match_type;
std::string input = " a b c d e f g hijklmnopqrstuvwxyz";
boost::copy(
input | tokenized(boost::regex("\\w+")),
std::ostream_iterator<match_type>(std::cout, "\n"));
return 0;
}
// ==================================================================
The source code is copied from this page
<a href="http://www.boost.org/doc/libs/1_56_0/libs/range/doc/html/range/reference/adaptors/reference/tokenized.html">http://www.boost.org/doc/libs/1_56_0/libs/range/doc/html/range/reference/adaptors/reference/tokenized.html</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>