[PATCH] [libcxx] Fix PR 22468 - std::function<void()> does not accept non-void-returning functions

Eric Fiselier eric at efcs.ca
Thu Feb 5 11:09:37 PST 2015


Hi mclow.lists, K-ballo, eugenis,

The bug can be found here: http://llvm.org/bugs/show_bug.cgi?id=22468

`__invoke_void_return_wrapper` is needed to properly handle calling a function that returns a value but where the std::function return type is void. Without this '-Wsystem-headers' will cause `function::operator()(...)` to not compile.

http://reviews.llvm.org/D7444

Files:
  include/__functional_03
  include/__functional_base
  include/__functional_base_03
  include/functional
  test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp
  test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp
  test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
  test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke_no_variadics.pass.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7444.19420.patch
Type: text/x-patch
Size: 8347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150205/5a828393/attachment.bin>


More information about the cfe-commits mailing list