File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,19 @@ private:
7676template <typename Signature>
7777using Function = FunctionSized<sizeof (void *) * 2 , Signature>;
7878
79+
7980template <unsigned size = sizeof (void *) * 2 >
80- using CallbackSized = FunctionSized<size, void (void )>;
81+ struct CallbackSized : FunctionSized<size, void (void )>{
82+ CallbackSized () = default ;
83+
84+ template <typename Callable>
85+ CallbackSized (Callable callable) : FunctionSized<size, void (void )>{callable}{}
86+
87+ };
88+ // Note: we could just define CallbackSized like the following, but
89+ // that breaks the API for functions using CallbackSized in their signature
90+ // template<unsigned size = sizeof(void *) * 2>
91+ // using CallbackSized = FunctionSized<size, void(void)>;
8192
8293using Callback = CallbackSized<2 * sizeof (void *)>;
94+
You can’t perform that action at this time.
0 commit comments