Re: [Boost-bugs] [Boost C++ Libraries] #4489: References to function object types

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4489: References to function object types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-04 10:43:09


#4489: References to function object types
--------------------------------------+-------------------------------------
  Reporter: cschmidt | Owner: djwalker
      Type: Feature Requests | Status: new
 Milestone: Boost 1.44.0 | Component: utility
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by michel):

 Boost's decltype-based `result_of` already accepts references to function
 objects.
 Users can explicitly enable decltype-based `result_of` by defining
 `BOOST_RESULT_OF_USE_DECLTYPE`.
 Or, in the trunk code, it is automatically enabled when a compiler
 supports N3276 decltype (e.g. clang-3.1).

 For example, on clang-3.1 with the following functor:
 {{{
 struct F
 {
     short operator()(int) & { return 0; }
     float operator()(int) && { return 0; }
 };
 }}}
 * `boost::result_of<F& (int)>::type` evaluates to `short`.
 * `boost::result_of<F&&(int)>::type` evaluates to `float`.

 Is this enough for you? Or, do you want this feature in tr1-style
 `result_of`?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4489#comment:5>
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:09 UTC