Subject: [Boost-bugs] [Boost C++ Libraries] #3114: Modified interface to allow even lazier return types for defaults
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-30 23:51:19
#3114: Modified interface to allow even lazier return types for defaults
--------------------------+-------------------------------------------------
Reporter: jewillco | Owner: danielw
Type: Patches | Status: new
Milestone: Boost 1.40.0 | Component: parameter
Version: Boost 1.38.0 | Severity: Problem
Keywords: |
--------------------------+-------------------------------------------------
There are some use cases where the return type of operator() in a default
computation class is not valid in some cases when that default is not
used. The current interface to such classes does not allow that case; see
the message at http://lists.boost.org/Archives/boost/2009/05/152009.php
for more information. The attached patch allows a special member type
(that must be void) to be used to change the interface to pass a single
int argument to operator(), while keeping the old no-parameter interface
for function objects without the special tag. The tag could also have
been implemented as a traits class used with enable_if. The patch passes
all of the Boost.Parameter tests except two (which appear to freeze up).
I only changed the normal path through the code, and not the compatibility
code which I am unable to test. A test for the new functionality added by
the patch is also attached.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3114> 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:00 UTC