Re: [Boost-bugs] [Boost C++ Libraries] #5127: Incorrect result_of usage in transform_iterator

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5127: Incorrect result_of usage in transform_iterator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-18 21:16:47


#5127: Incorrect result_of usage in transform_iterator
--------------------------------------+-------------------------------------
  Reporter: mimomorin@… | Owner: dave
      Type: Patches | Status: closed
 Milestone: Boost 1.47.0 | Component: iterator
   Version: Boost Development Trunk | Severity: Problem
Resolution: fixed | Keywords: transform_iterator
--------------------------------------+-------------------------------------

Comment (by TLBettens@…):

 == Warning message introduced into release 1_50_0 ==

 This change went into release 1-50_0 and now causes a warning message to
 be emitted in Visual C++ version 10, perhaps others versions as well.

 Compiler warning message:

 {{{
 2>c:\boostbuilding\boost_1_50_0\boost\iterator\transform_iterator.hpp(49):
 warning C4180: qualifier applied to function type has no meaning; ignored
 2>
 c:\boostbuilding\boost_1_50_0\boost\iterator\transform_iterator.hpp(70) :
 see reference to class template instantiation
 'boost::detail::transform_iterator_base<UnaryFunc,Iterator,Reference,Value>'
 being compiled
 }}}

 Workaround is to either revert back to release 1_49_0 by removing the
 '''const''':

 {{{
 boost::result_of</*const*/ UnaryFunction(Iterator::reference)>
 }}}

 , or disable the warning message using something like:

 {{{
         #if defined(BOOST_MSVC)
         # pragma warning (push)
         # pragma warning (disable:4180) // warning C4180: qualifier
 applied to function type has no meaning; ignored
         #endif
           typedef typename ia_dflt_help<
               Reference
             , result_of<const UnaryFunc(typename
 std::iterator_traits<Iterator>::reference)>
>::type reference;
         #if defined(BOOST_MSVC)
         # pragma warning (pop)
         #endif

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5127#comment:7>
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:50:10 UTC