Opened 13 years ago

Closed 13 years ago

#3428 closed Bugs (invalid)

Boost::regex brackets after \\??

Reported by: NLegende@… Owned by: John Maddock
Milestone: Boost 1.41.0 Component: regex
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

For example declare: const boost::regex format("match
??(match)"); and run program.

If I use brackets after
?? I get error "Microsoft C++ exception: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::regex_error> >"

If I use brackets after (
?)? then it works.

Change History (1)

comment:1 by John Maddock, 13 years ago

Resolution: invalid
Status: newclosed

This is an MSVC / std C++ issue, the character sequence ??( is treated as a trigraph by the compiler, so the string passed to Boost.Regex isn't the one you think you're passing :-(

See http://msdn.microsoft.com/en-us/library/bt0y4awe.aspx

HTH, John.

Note: See TracTickets for help on using tickets.