Boost logo

Boost Users :

From: James Widman (widman_at_[hidden])
Date: 2005-08-12 17:32:42

Hi Okko,

On Aug 12, 2005, at 3:58 AM, Okko Willeboordse wrote:

> When I lint my code, using boost 1-32, using PC-Lint I get some
> issues on the Boost code.
> I use 'PC-lint for C/C++ (NT) Vers. 8.00r, Copyright Gimpel
> Software 1985-2005' so the
> new patch that should deal with Boost better.
> These are the issues;
> BOOST_STATIC_CONSTANT(bool, value = helper::value);
> C:\Boost\include\boost-1_32\boost\type_traits\is_enum.hpp(143):
> error 1061: (Error -- public member 'boost::mpl::bool_<<1>>::value'
> is not accessible through non-public inheritance)
> BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false)

I haven't yet bothered to examine the preprocessor output to see
what's going on, but if none of the compilers complained about this,
then odds are very, very good that this is caused by a bug in Lint.

> C:\Boost\include\boost-1_32\boost\mpl\aux_\has_apply.hpp(22): error
> 64: (Error -- Type mismatch (arg. no. 1) (volatile const
> boost::mpl::aux::has_apply_wrapper_<T> * =
> boost::mpl::aux::has_apply_wrapper_<T> *))
> BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false)
> C:\Boost\include\boost-1_32\boost\mpl\aux_\has_tag.hpp(20): error
> 64: (Error -- Type mismatch (arg. no. 1) (volatile const
> boost::mpl::aux::has_tag_wrapper_<T> * =
> boost::mpl::aux::has_tag_wrapper_<T> *))

This just looks wrong on the face of it: going from less to more cv-
qualification should not elicit a type mismatch error. Again,
certain compilers have been shown to be more trustworthy with
template metaprograms; if none of them complained, then Lint almost
certainly shouldn't.

Just remember that version 8.00r is the cope-with-Boost-so-we-don't-
have-a-catastrophic-failure release, not the parse-absolutely-
everything-in-Boost-correctly release.** Hopefully the latter will
not be too far off in the future, but we'll need to balance such
efforts against the rest of our development workload. In the
meantime, our hope and expectation is that the pain felt by Boost/
Lint users can be largely mitigated through judicious uses of
selective message suppression options. Contact us directly if you
need help with that.

[** However, 8.00r is a lot better than 8.00q in terms of parsing
various Boost constructs according to the Standard.]


James Widman

Gimpel Software

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at