[Boost-bugs] [Boost C++ Libraries] #8208: param of xpressive::sregex_iterator compiler error in VS2012

Subject: [Boost-bugs] [Boost C++ Libraries] #8208: param of xpressive::sregex_iterator compiler error in VS2012
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-01 02:25:33


#8208: param of xpressive::sregex_iterator compiler error in VS2012
----------------------------------+-----------------------------------------
 Reporter: wanhihihlo@… | Owner: eric_niebler
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: xpressive
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
----------------------------------+-----------------------------------------
 Windows7 64bit, MS Visual Studio 2012 (VC11), build with 32bit;

 I just compiler example code in user's guide,
 "Find all the sub-strings that match a regex and step through them one at
 a time" :
     std::wstring str( L"This is his face." );
     wsregex token = +alnum;
     wsregex_iterator cur( str.begin(), str.end(), token ); //<---error
     wsregex_iterator end;
 for( ; cur != end; ++cur ) {
         wsmatch const &what = *cur;
         std::wcout << what[0] << L'\n';
 }

 compiler said undeclared identifier of "token" in
 "wsregex_iterator cur( str.begin(), str.end(), token );" !!!

 I changed the var "token" to "tt_k", it report same error still.
 The sample code compiler OK in VS2010, but fail in VS2012.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8208>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC