Opened 10 years ago
Closed 10 years ago
#7754 closed Feature Requests (duplicate)
Allow result_of to fall back on decltype
Reported by: | Owned by: | Daniel Walker | |
---|---|---|---|
Milestone: | To Be Determined | Component: | result_of |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
result_of uses decltype by default on very few compilers, since most current compilers' decltype support doesn't work for some TR1-style usage.
Many of those same compilers support C++11 lambdas which don't follow TR1 result_of protocol. Currently, this makes lambdas very difficult to use with other code using result_of.
The attached code allows compilers which partially support decltype to use it only on functors which don't publish a result_type or result struct.
It also contains tests & doc changes. Compiled with VC10, clang++3.1 & g++4.5 (both compilers with and without -std=c++0x).
Oops, sorry for the duplicate -- it's rejecting my patch as it has a URL, and the captcha seems to not be working. . . please close when able.