Testing C++ API: add a visitor over the ElementHandle

This commit is contained in:
Olivier Goffart 2024-06-06 18:23:45 +02:00
parent 2d6a8b1545
commit 58826ddd94
6 changed files with 91 additions and 15 deletions

View file

@ -689,11 +689,9 @@ public:
///
/// Note: Since the ComponentInstance holds the handler, the handler itself should not
/// capture a strong reference to the instance.
// clang-format off
template<std::invocable<std::span<const Value>> F>
requires(std::is_convertible_v<std::invoke_result_t<F, std::span<const Value>>, Value>)
auto set_callback(std::string_view name, F callback) const -> bool
// clang-format on
{
using namespace cbindgen_private;
auto actual_cb =