Boost logo

Boost Users :

Subject: Re: [Boost-users] issue when using boost::tokensizer with std::wstring.
From: Igor R (boost.lists_at_[hidden])
Date: 2011-01-18 04:22:17


> Ok, This is still not working, I now have:
> std::wstring TokensStr(Item);
> boost::char_delimiters_separator<wchar_t> sep;
> boost::tokenizer<boost::char_delimiters_separator<wchar_t> > tok(TokensStr);
> I now have the errors:

Well, I don't understand the motivation behind this, but it appears
that tokenizer template is declared as follows:
  template <
    typename TokenizerFunc = char_delimiters_separator<char>,
    typename Iterator = std::string::const_iterator,
    typename Type = std::string
>
  class tokenizer;

So you have to pass all the 3 params explicitly:

boost::tokenizer<boost::char_delimiters_separator<wchar_t>,
std::wstring::const_iterator, std::wstring> tok(TokensStr);


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net