|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-08-13 11:13:01
"stefan_felkel2000" <Stefan.Felkel_at_[hidden]> writes:
> Hi all,
>
> Since I have included boost\dynamic_bitset.hpp in my project,
> PC-Lint reports many thousands of redefinitions of symbol
> 'is_same_part_1<<1>>::part_2<<1>> for the following code
> in type_traits\is_same.hpp.
>
> #ifdef BOOST_MSVC
> // the following VC6 specific implementation is *NOT* legal
> // C++, but has the advantage that it works for incomplete
> // types.
>
> template< typename T1 >
> struct is_same_part_1
> {
> template<typename T2> struct part_2 { enum { value =
> false }; };
> template<> struct part_2<T1> { enum { value =
> true }; };
> };
>
>
> If I replace
>
> #ifdef BOOST_MSVC
>
> with
>
> #if (defined BOOST_MSVC) && (BOOST_MSVC < 1300)
>
> The code compiles with Visual Studio .NET 2003 and PC-Lint doesn't
> report any error.
This is an odd request, since Visual Studio .NET 2003 never compiles
that part of the file as BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is
not defined for VC7.1. To make PC-Lint happy I was going to check in
a patch, but then it occurred to me: this code *is* nonconforming, so
a lint tool *should* complain when it's encountered. So I guess the
question is: why is your PC-Lint not configured to emulate your VC7.1
compiler? If it was, it would never see that code either.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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