Boost logo

Boost :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2002-07-15 17:40:30

John Maddock wrote:
> > Now the next problem that compiler crashes on is this:
> >
> > ...
> > ../../../boost/regex/detail/regex_match.hpp:490: Internal compiler error.
> > ../../../boost/regex/detail/regex_match.hpp:490: Please submit a full bug
> report
> > to `egcs-bugs_at_[hidden]'.
> > ...
> That may be a dead end then, sorry, unless you can see a way to rephrase the
> offending code so that the compiler is happy...

I have managed to find a workaround, at least for my case. The compiler
dislikes calls to the regex_traits::is_class function, when it is a static class
member and it is called from an object of the class. The workaround is to call
the static function without referring to an object.

In my case, regex_traits is derived from c_regex_traits<charT>, so I have
littered boost/regex/detail/regex_format.hpp and
boost/regex/detail/regex_match.hpp with code that looks like this:

         bool b = traits::is_class(*first, traits::char_class_word);
         bool b = traits_inst.is_class(*first, traits::char_class_word);

It's ugly, and there might be a better way to identify the problem with a config
macro (e.g., BOOST_REGEX_USE_STATIC_IS_CLASS), but it works for me.

Do you see any problem with my using this on my other platforms? I expect it to
generate exactly the same code.

Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios      
44 South Broadway, White Plains, NY 10601

Boost list run by bdawes at, gregod at, cpdaniel at, john at