Commit 87622a34 authored by Andrew Gallagher's avatar Andrew Gallagher Committed by Facebook Github Bot

folly/pushmi: workaround clang modules bug

Summary:
Use of `auto` as a return type of a class member function is causing clang
module build errors.  I've yet to completely reduce this issue and file an
upstream bug report.

This diff works around it for now by using `decltype`.

Reviewed By: kirkshoop

Differential Revision: D13056670

fbshipit-source-id: cffaa2ff347429935bd2c8ef9044339eed946b0f
parent 18b566ae
...@@ -144,7 +144,9 @@ class single_sender<SF, EXF> { ...@@ -144,7 +144,9 @@ class single_sender<SF, EXF> {
constexpr single_sender(SF sf, EXF exf) constexpr single_sender(SF sf, EXF exf)
: sf_(std::move(sf)), exf_(std::move(exf)) {} : sf_(std::move(sf)), exf_(std::move(exf)) {}
auto executor() { // TODO(T36778706): Workaround issues with `auto` as a method return type in
// modular builds in older versions of clang.
invoke_result_t<EXF&> executor() {
return exf_(); return exf_();
} }
PUSHMI_TEMPLATE(class Out) PUSHMI_TEMPLATE(class Out)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment