xo-callback xo-alloc: + GC copy callbacks + unique_ptr cbset support
This commit is contained in:
parent
746dc4b0e2
commit
4eae80295a
7 changed files with 405 additions and 285 deletions
24
xo-callback/include/xo/callback/callback_concept.hpp
Normal file
24
xo-callback/include/xo/callback/callback_concept.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* @file callback_concept.hpp
|
||||
*
|
||||
* author: Roland Conybeare, Aug 2025
|
||||
*/
|
||||
|
||||
namespace xo {
|
||||
namespace fn {
|
||||
/** @concept callback_concept
|
||||
* @brief Concept for functors that can be used with @ref CallbackSetImpl
|
||||
*
|
||||
**/
|
||||
template <typename Callback>
|
||||
concept callback_concept = requires(Callback cb)
|
||||
{
|
||||
// no constraints on how callback is invoked.
|
||||
|
||||
{ cb.notify_add_callback() };
|
||||
{ cb.notify_remove_callback() };
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* callback_concept.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue