mirror of https://github.com/ARMmbed/mbed-os.git
callback: Moved out sfinae logic into a macro
This is required to allow doxygen to properly parse the function declarations, otherwise it gets confused around the nested templates.pull/4233/head
parent
6c0a75728d
commit
8705305cab
|
@ -58,6 +58,12 @@ namespace detail {
|
|||
};
|
||||
}
|
||||
|
||||
#define MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M) \
|
||||
typename detail::enable_if< \
|
||||
detail::is_type<M, &F::operator()>::value && \
|
||||
sizeof(F) <= sizeof(uintptr_t) \
|
||||
>::type = detail::nil()
|
||||
|
||||
/** Callback class based on template specialization
|
||||
*
|
||||
* @note Synchronization level: Not protected
|
||||
|
@ -164,10 +170,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)())) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -176,10 +179,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)() const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -188,10 +188,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)() volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -200,10 +197,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)() const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -412,10 +406,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)())) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -429,10 +420,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)() const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -446,10 +434,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)() volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -463,10 +448,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)() const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)() const volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -762,10 +744,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0))) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -774,10 +753,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -786,10 +762,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -798,10 +771,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1010,10 +980,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0))) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1027,10 +994,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1044,10 +1008,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1061,10 +1022,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0) const volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1361,10 +1319,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1))) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1373,10 +1328,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1385,10 +1337,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1397,10 +1346,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1609,10 +1555,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1))) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1626,10 +1569,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1643,10 +1583,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1660,10 +1597,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1) const volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -1961,10 +1895,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2))) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1973,10 +1904,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1985,10 +1913,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -1997,10 +1922,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -2209,10 +2131,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2))) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -2226,10 +2145,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -2243,10 +2159,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -2260,10 +2173,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2) const volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -2562,10 +2472,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3))) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -2574,10 +2481,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) const)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -2586,10 +2490,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -2598,10 +2499,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) const volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -2810,10 +2708,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3))) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -2827,10 +2722,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) const)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -2844,10 +2736,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -2861,10 +2750,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3) const volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -3164,10 +3050,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4))) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -3176,10 +3059,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4) const)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -3188,10 +3068,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4) volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -3200,10 +3077,7 @@ public:
|
|||
* @note The function object is limited to a single word of storage
|
||||
*/
|
||||
template <typename F>
|
||||
Callback(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
Callback(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4) const volatile)) {
|
||||
generate(f);
|
||||
}
|
||||
|
||||
|
@ -3412,10 +3286,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4), &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4))) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -3429,10 +3300,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4) const, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4) const)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -3446,10 +3314,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4) volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4) volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
@ -3463,10 +3328,7 @@ public:
|
|||
template <typename F>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"Replaced by simple assignment 'Callback cb = func")
|
||||
void attach(const volatile F f, typename detail::enable_if<
|
||||
detail::is_type<R (F::*)(A0, A1, A2, A3, A4) const volatile, &F::operator()>::value &&
|
||||
sizeof(F) <= sizeof(uintptr_t)
|
||||
>::type = detail::nil()) {
|
||||
void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R (F::*)(A0, A1, A2, A3, A4) const volatile)) {
|
||||
this->~Callback();
|
||||
new (this) Callback(f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue