Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2002-09-13 06:28:30


> I'm trying to build the boost.regex library from boost 1.28.0
> using IBMs xlC 5.0 on AIX. I have installed the latest fixes
> for the compiler.
>
> The compiler has two problems. The first:
>
> "libs/regex/build/../src/cpp_regex_traits.cpp", line 196.39: 1540-0257
> (S) An object or reference of type "std::messages_base::catalog" cannot
> be initialized with an expression of type "int".
> "libs/regex/build/../src/cpp_regex_traits.cpp", line 586.42: 1540-0257
> (S) An object or reference of type "std::messages_base::catalog" cannot
> be initialized with an expression of type "int".
>
> This is because std::messages_base::catalog is not an int as required
> by the C++ standard but of type nl_catd. (Probably due to the
> requirements in IEEE Std 1003.1-2001). A simple C-style cast would fix
this.

I've added a static_cast, which will hopefully fix that, however later on
that code checks to see if the std::messages<char>::catalog object is < 0,
which I presume will fail as well?

> The second problem is:
>
> "/mount/auto/ginit/src/boost-1.28.0/boost/regex.hpp", line 528.13:
> 1540-1628 (S) Every template parameter for a constructor template must
> be used in the parameter list of the constructor.
>
> It complains about the following constructor and I have no idea how to
> fix this. Any ideas anyone?
>
> template <class charT, class traits, class Allocator >
> class reg_expression : public regbase
> {
> template <class ST, class SA>
> explicit reg_expression(const std::basic_string<charT, ST, SA>& p,
> flag_type f = regbase::normal, const Allocator& a = Allocator())
> : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
> { set_expression(p, f | regbase::use_except); }
> };

No idea, for now I've changed the pre-processor logic to:

#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !(defined(__IBMCPP__) &&
(__IBMCPP__ <= 500))

So assuming I've got the __IBMCPP__ version check right, this will more or
less fix the issue, it's not an ideal fix though.
If you can, can you check the latest cvs source to see if this is OK now?

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


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