[Boost-bugs] [Boost C++ Libraries] #1863: Boost.Regex unstable with Borland Turbo C++ 2006

Subject: [Boost-bugs] [Boost C++ Libraries] #1863: Boost.Regex unstable with Borland Turbo C++ 2006
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-04-24 22:16:25


#1863: Boost.Regex unstable with Borland Turbo C++ 2006
-------------------------------------+--------------------------------------
 Reporter: runeDOTallnorATgocDOTno | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: regex
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 I've been using Boost.Regex with Borland's Turbo Pascal
 2006 compiler. A core code example is included below. The objective is
 to use Boost.Regex in a console application.

 The problem is that the compiler in about 50% of runs fails
 with a 'Error 1004: Fatal Internal Compiler Error' unless
 I do one of the following:

 1) Build a windows Single Document Interface application as opposed to a
 console application.

 2) Include <boost/filesystem.hpp> before <boost/regex.hpp>, as
 demonstrated below.

 Brgds,

 Rune
 {{{
 //////////////////////////////////////////////////////////////////////
 #include <string>
 //#include <boost/filesystem.hpp> // Uncomment to stabilize
                                   // Boost.Regex
 #include <boost/regex.hpp> // V. 1.34

 int main(int argc, char* argv[])
 {
          // Regular expression to find a date on the format
          // DD.MM.YYYYY (as per usual Norwegian style).
         boost::regex r("(^\\d{2})[.](\\d{2})[.](\\d{4})");

         std::string s("12.34,5678"); // Note the comma!

         bool b = boost::regex_match(s,r); // should evaluate to
              // 'false' but spawns a 'Fatal compiler error' with
              // Borland Turbo C++ 2006. If this example compiles
              // first time around, change ',' (comma) to '.'
              // (dot) in the declaration of the string s and
              // recompile.

         return 0;
 }
 //////////////////////////////////////////////////////////////////////
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1863>
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:49:57 UTC