Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-23 12:43:37


John Maddock wrote:

> #include <boost/regex.hpp>
> typedef boost::reg_expression<char> regex_t;
> <
>
> Therein lies the problem, regex_t is a type already used by the POSIX C
> API's - I'm surprised that you didn't get an error on the declaration -

        Hmmm. I see.

> anyway change regex_t to something else, or better still just use
> boost::regex as that's already typedef'ed for you as a
> reg_expression<char>.

        I can't: Felix type bindings:

        type regex = "regex";

require the string on the RHS to be a single word.
So I can't use 'boost::regex' directly. I am now using

        typedef boost::regex regex;

But the real problem was that I was calling regex_match
with the arguments in the wrong order! I was surprised that
I didn't get a list of candidates (gcc normally gives a
list of candidates when it finds a name, but can't
do a match). This may have something to do with Koenig lookup

Anyhow, thanks.

-- 
John (Max) Skaller, mailto:skaller_at_[hidden]
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk