Is there not a DR for this already?
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.
To post to this group, send email to std-dis...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-discussion/.
On 2016–11–01, at 8:14 AM, Brian Bi <bbi...@gmail.com> wrote:BumpThis issue also occurs with lambdas, where it is difficult to see.
http://stackoverflow.com/questions/32871606/odd-return-behavior-with-stdfunction-created-from-lambda-c/32872389I think we can make this a compile error if the std::function<R(A...)> constructor is disabled when:
- R is a reference to cv1 T, and
- the callable object returns a prvalue of type cv2 U, and
- U is the same as T, or is a class type derived from T.
On 2016–11–01, at 8:14 AM, Brian Bi <bbi...@gmail.com> wrote:
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.
To post to this group, send email to std-dis...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-discussion/.