http://llvm.org/bugs/show_bug.cgi?id=22023

            Bug ID: 22023
           Summary: Clang does not compile boost::adaptor::tokenized
                    correctly.
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

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
http://www.boost.org/doc/libs/1_56_0/libs/range/doc/html/range/reference/adaptors/reference/tokenized.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to