Boost logo

Boost :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-04-25 06:51:54


Is anyone using the regex lib with CW on the Mac, the following has landed
on my desk, but not being a CW user I haven't been able to solve the
compiler problems, any ideas anyone?

Many thanks,

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm

----- Original Message -----
From: "Hendrik Schober" <h.schober_at_[hidden]>
To: "John Maddock" <John_Maddock_at_[hidden]>
Sent: Tuesday, April 09, 2002 1:08 PM
Subject: Regex in boost 1.26

>
> Hi John,
>
> I'm having a novice porting code of mine which uses
> regex to CodeWarrior on the Mac. First, he said, he
> couldn't use boost 1.27 because there wasn't any
> configuration for CW. Well, so he uses 1.26.
>
> Anyway, in "c_regex_traits.cpp", line 178, theres the
> following code:
>
> template <class charT>
> unsigned int BOOST_REGEX_CALL re_get_message(charT* buf, unsigned int
len, unsigned int id)
> {
> unsigned int size = _re_get_message((char*)0, 0, id);
> if(len < size)
> return size;
> boost::scoped_array<char> cb(new char[size]);
> _re_get_message(cb.get(), size, id);
> size = boost::c_regex_traits<wchar_t>::strwiden(buf, len, cb.get());
> return size;
> }
>
> inline unsigned int BOOST_REGEX_CALL re_get_message(char* buf, unsigned
int len, unsigned int id)
> {
> return _re_get_message(buf, len, id);
> }
>
> Unfortunately, this causes CW to emit a couple of errors
> along the line:
>
> Error : ambiguous access to overloaded function
> '@unnamed_at_c_regex_traits_cpp@::re_get_message(char *, unsigned int,
unsigned int)'
> '@unnamed_at_c_regex_traits_cpp@::re_get_message<...>(T0 *, unsigned int,
unsigned int)'
> c_regex_traits.cpp line 233 re_get_message(buf, 256, i+300);
>
> (There's four of them.)
>
> Is that a known problem? Do you know a workaround?
> (Renaming one of the 're_get_message()' functions does
> the job, but I'm not sure about the implications.)
>
> Also, in "fileiter.hpp", line #68, there's an
> #include <dirent.h>, which doesn't exist on the Mac.
> Simply commenting it out fixes the problem, but I
> rather suspect we're doing soemthing wrong, since
> (I think) boost is testing using CW?
>
> TIA,
>
> Hendrik Schober
>
>


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