Skip to content

Commit 52cb9bd

Browse files
committed
[DL] add function_wrapper_t deduction guide
1 parent 67fb6c3 commit 52cb9bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/interop/dl-api/include/alpaqa/dl/dl-problem.h

+4
Original file line numberDiff line numberDiff line change
@@ -664,10 +664,14 @@ using problem_functions_t = alpaqa_problem_functions_t;
664664
using control_problem_functions_t = alpaqa_control_problem_functions_t;
665665

666666
namespace detail {
667+
/// Custom type for which we can export the RTTI to support std::any across
668+
/// shared library boundaries when using libc++.
667669
template <class Signature>
668670
struct ALPAQA_DL_PROBLEM_EXPORT function_wrapper_t {
669671
std::function<Signature> function;
670672
};
673+
template <class Signature>
674+
function_wrapper_t(std::function<Signature>) -> function_wrapper_t<Signature>;
671675
} // namespace detail
672676

673677
/// Make the given function available to alpaqa.

0 commit comments

Comments
 (0)