Re: [Boost-bugs] [Boost C++ Libraries] #10830: Clang static analyzer warns about <boost/graph/named_function_params.hpp>

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10830: Clang static analyzer warns about <boost/graph/named_function_params.hpp>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-11-04 17:10:36


#10830: Clang static analyzer warns about <boost/graph/named_function_params.hpp>
-------------------------------+----------------------
  Reporter: anonymous | Owner: jewillco
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: graph
   Version: Boost 1.57.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------

Comment (by Diego Barrios Romero <eldruin@…>):

 This also affects boost 1.62 which cannot be compiled with VS2015
 (MSVC14). I attached a patch with an ugly workaround.

 It adds a static instance of the param_not_found structure. A reference to
 this "singleton" object will be returned if necessary.
 As the structure itself is empty, wrong code could not do much with it.
 Furthermore, I imagine the whole param_not_found is just a construct to
 get the whole named-parameter system to work and the actual object
 returned will never be used in this case.

 I would be happy if someone reports a nicer solution.
 I would also be happy to submit this as a PR in github if you want.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10830#comment:2>
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:20 UTC