[Boost-bugs] [Boost C++ Libraries] #9691: Unused parameter 'args' in the definition of the macro BOOST_PARAMETER_FUNCTION

Subject: [Boost-bugs] [Boost C++ Libraries] #9691: Unused parameter 'args' in the definition of the macro BOOST_PARAMETER_FUNCTION
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-20 18:53:54


#9691: Unused parameter 'args' in the definition of the macro
BOOST_PARAMETER_FUNCTION
-------------------------------------------------+-------------------------
 Reporter: Laurent Rineau | Owner: danielw
  <Laurent.Rineau__boost@…> | Status: new
     Type: Bugs | Component: parameter
Milestone: To Be Determined | Severity: Problem
  Version: Boost 1.54.0 |
 Keywords: patch |
-------------------------------------------------+-------------------------
 In CGAL (www.cgal.org), usage of BOOST_PARAMETER_FUNCTION triggers several
 of such following warnings with recent g++ (4.8) and LLVM/clang:
 {{{
 CGAL-4.4-Ic-126/include/CGAL/perturb_mesh_3.h:39:1: warning: unused
 parameter 'args' [-Wunused-parameter]
 BOOST_PARAMETER_FUNCTION(
 ^
 /usr/local/include/boost/parameter/preprocessor.hpp:937:5: note: expanded
 from macro 'BOOST_PARAMETER_FUNCTION'
     BOOST_PARAMETER_FUNCTION_AUX( \
     ^
 /usr/local/include/boost/parameter/preprocessor.hpp:933:5: note: expanded
 from macro 'BOOST_PARAMETER_FUNCTION_AUX'
     BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER(name, args, 0, 0,
 tag_namespace)
     ^
 /usr/local/include/boost/parameter/preprocessor.hpp:911:5: note: expanded
 from macro 'BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER'
     BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER_AUX( \
     ^
 /usr/local/include/boost/parameter/preprocessor.hpp:899:21: note: expanded
 from macro 'BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER_AUX'
       , Args const& args \
                     ^
 }}}

 I have verified that indeed the parameter is not used, and I propose that
 '''patch''':
 {{{
 diff --git a/include/boost/parameter/preprocessor.hpp
 b/include/boost/parameter/preprocessor.hpp
 index f1bda87..23ddbc4 100644
 --- a/include/boost/parameter/preprocessor.hpp
 +++ b/include/boost/parameter/preprocessor.hpp
 @@ -896,7 +896,7 @@ struct funptr_predicate<void**>
      BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \
      ResultType BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \
          ResultType(*)() \
 - , Args const& args \
 + , Args const& \
        , int \
          BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
              BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG \
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9691>
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:15 UTC