summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-07-27 10:50:46 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-07-27 10:50:46 -0400
commit5000f8bd123a87ffbc321a7e3fed61221c9a4da1 (patch)
tree462d2a1d91f9a59d05a78fbd03b3339bd2004e00
parentedab599edaf67d37a3a2e954371128676a8cf9cc (diff)
DRTVWR-587: Try to work around clang bug.
-rw-r--r--indra/llcommon/lazyeventapi.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llcommon/lazyeventapi.h b/indra/llcommon/lazyeventapi.h
index e2dec8f35b..cc566e35af 100644
--- a/indra/llcommon/lazyeventapi.h
+++ b/indra/llcommon/lazyeventapi.h
@@ -72,21 +72,24 @@ namespace LL
// Use connect_extended() so the lambda is passed its own
// connection.
+ // apply() can't accept a template per se; it needs a particular
+ // specialization. Specialize out here to work around a clang bug:
+ // https://github.com/llvm/llvm-project/issues/41999
+ auto func{ &LazyEventAPIBase::add_trampoline
+ <const std::string&, const std::string&, ARGS...> };
+
// We can't bind an unexpanded parameter pack into a lambda --
// shame really. Instead, capture all our args as a std::tuple and
// then, in the lambda, use apply() to pass to add_trampoline().
mParams.init.connect_extended(
- [args = std::make_tuple(name, desc, std::forward<ARGS>(rest)...)]
+ [func, args = std::make_tuple(name, desc, std::forward<ARGS>(rest)...)]
(const boost::signals2::connection& conn, LLEventAPI* instance)
{
// we only need this connection once
conn.disconnect();
// apply() expects a tuple specifying ALL the arguments,
// so prepend instance.
- // apply() can't accept a template per se; it needs a
- // particular specialization.
- apply(&LazyEventAPIBase::add_trampoline<const std::string&, const std::string&, ARGS...>,
- std::tuple_cat(std::make_tuple(instance), args));
+ apply(func, std::tuple_cat(std::make_tuple(instance), args));
});
}