$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-09-16 03:54:05
John Maddock wrote:
John Maddock wrote:
>
> > 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?
>
No, sorry, a static cast won't do. You need a c style cast or a reinterpret
cast, because it's some pointer type.
Interestingly the comparision later on doesn't fail...
> > 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?
No, sorry, still doesn't work. My compiler has a version number of 502, not
500. Looks like it was increased by some of the fix packs.
Thanks, Markus