Boost logo

Boost Users :

From: gast128 (gast128_at_[hidden])
Date: 2006-08-09 11:47:06


Let's leave the actual case, but take the example of having input which has
different combinations for each caracter. One can make strings for each of
this case, but this explodes of course the number of combinations.

So suppose I still have a string like a[a,b][a,c] representing all cases of
this string. Now suppose regex_match is going to match this with (a|b)*. I can
imagine that it in the end it will call something like if (*it == 'a'). This
is the equality operator called for the type the iterator is pointing to.

thus e.g.

struct multiple_string
{
   typedef std::string char_type;
   
   std::vector<std::string> m_Data;
};

bool operator==(char_type k1, multiple_string::char_type k2)
{
   //etc...
}

Now the whole question was, how do I hget something like this compilable with
boost regex. I see that it has overloads for icu and MFC string, but these
always seems to be character based.

Put it in another way, is boost regex biased towards string types, or supports
it a generic interface.

Wkr,
me


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net