[Boost-bugs] [Boost C++ Libraries] #1097: keyword.hpp generates many warnings C4180: qualifier applied to function type has no meaning; ignored

Subject: [Boost-bugs] [Boost C++ Libraries] #1097: keyword.hpp generates many warnings C4180: qualifier applied to function type has no meaning; ignored
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-07-18 16:44:25


#1097: keyword.hpp generates many warnings C4180: qualifier applied to function
type has no meaning; ignored
-------------------------------------+--------------------------------------
 Reporter: pbristow | Owner: danielw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: parameter
  Version: release 1.34.0 | Severity: Problem
 Keywords: parameter keyword c4180 |
-------------------------------------+--------------------------------------
 KEYWORD_050328_HPP

 template <class Tag>
 struct keyword
 {
     template <class T>
     typename aux::tag<Tag, T>::type const
                                    ^^^^^^^^^ this const is said to be
 meaningless

 and could be commented out.

     operator=(T& x) const
     {
         typedef typename aux::tag<Tag, T>::type result;
         return result(x);
     }

 there are several others similar.

 This creates a blizzard of warnings, even at normal warning level 3. (4180
 is a level 1 warning).

 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
 # pragma warning(disable: 4512) // assignment operator could not be
 generated.
 # pragma warning(disable: 4180) // qualifier applied to function type has
 no meaning; ignored
 #endif

 produced a quiet compilation.

 So I suggest either commenting out the const,

 AND push the above disables, and popping at the end.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1097>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC