[Boost-bugs] [Boost C++ Libraries] #13080: Boost Xpressive ignores capture placeholders

Subject: [Boost-bugs] [Boost C++ Libraries] #13080: Boost Xpressive ignores capture placeholders
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-06-18 21:25:04


#13080: Boost Xpressive ignores capture placeholders
--------------------------------------------+--------------------------
 Reporter: Evgeny Yashin <johny5.coder@…> | Owner: eric_niebler
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: xpressive
  Version: Boost 1.62.0 | Severity: Showstopper
 Keywords: |
--------------------------------------------+--------------------------
 This code:
 {{{
 #include "boost/xpressive/xpressive.hpp"

 int main()
 {
         using namespace boost::xpressive;

         cregex scheme = (s1 = +_w) >> "://";
         cregex host_ipv6 = (s2 = ('[' >> +(xdigit | ':') >> ']'));
         cregex uri_re = scheme >> host_ipv6;

         cmatch m;
         if( regex_match( "http://[fe::]", m, uri_re ) )
         {
                 // [first, last) pair of iterators, with implicit
 operator string()
                 std::string protocol = m[1];
                 protocol = protocol;
         }

     return 0;
 }

 }}}

 It runs and it matches but protocol will contain empty string.
 Visual Studio 2015, in debug/release, 32/64bit.

--
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13080>
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-06-18 21:29:25 UTC