|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-01-23 11:18:35
Test at 13 Jan 2006 MS moans in basic_cstring.hpp at
value_type operator[]( size_type index ) const;
value_type at( size_type index ) const;
"C4180 qualifier applied to function type has no meaning; ignored"
A qualifier, such as const, is applied to a function type defined by
typedef.
Example
Copy Code// C4180.cpp
// compile with: /W1 /c
typedef int *FuncType(void);
// the const qualifier cannot be applied to the function type FuncType
const FuncType f; // C4180
Does this mean it wants a typedef const_value_type instead?
Meanwhile, I have added to suppress_warnings.hpp
# pragma warning(disable: 4224) // nonstandard extension used : formal
parameter 'tm' was previously defined as a type
tm needs renaming?
# pragma warning(disable: 4180) // qualifier applied to function type has no
meaning; ignored
Suppresses the clutter. (And I feel strongly that although trivial, Boost
should try hard to avoid spurious warnings like these for those whose
Standards demand they use the pickiest warning level).
(Speaking boost-wide, I note that
warning C4127: conditional expression is constant
is very common and I cannot conceive of when it could possibly be helpful.
Also
warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance
warning)
Should a 'certain to be included' boost file 'globally' disable at least
these two warnings? Insert into boost config?
)
Paul
PS MSVC 8.0 notes:
Conversion wizard runs fine with no errors. (some 3 conversion warnings
which look unimportant).
There are very many warnings like:
i:\boost-06-01-13-0500\boost\test\results_collector.hpp(79) : warning C4275:
non dll-interface class 'boost::noncopyable_::noncopyable' used as base for
dll-interface class 'boost::unit_test::singleton<Derived>'
with
[
Derived=boost::unit_test::results_collector_t
]
i:\boost-06-01-13-0500\boost\noncopyable.hpp(22) : see declaration
of 'boost::noncopyable_::noncopyable'
Should this be disabled somewhere too?
-- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204 mailto: pbristow_at_[hidden] http://www.hetp.u-net.com/index.html http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk