AsyncObserver (#4444)

* feat(AsyncObserver): Improve NotificationCenter speed and usability #4414

* fix(Notification): add missing header

* feat(Any): add checkers for holding nullptr #4447

* feat(NotificationCenter): g++ build and refactoring #4414

* fix(Observer): compile errors on some compilers #4414

* fix(NotificationCenter): compile errors #4414

* chore(ParallelSocketAcceptor): remove unnecessary include and using from header

* feat(AsyncNotificationCenter): add #4414

* test(AsyncNotificationCenter): add mixed observer types to the test #4414

* fix(AsyncNotificationCenter): hangs on program exit #4414

* fix(dev): friend not honored, temporarily make private members public

* fix(AsyncNotificationCenter); remove default #4414
This commit is contained in:
Aleksandar Fabijanic
2024-02-16 09:34:19 +01:00
committed by GitHub
parent 30a0a06bac
commit 88be66972a
24 changed files with 882 additions and 139 deletions

View File

@@ -165,42 +165,16 @@ protected:
#endif
//
// poco_static_assert
//
// The following was ported from <boost/static_assert.hpp>
//
#define poco_static_assert(B) static_assert(B)
template <bool x>
struct POCO_STATIC_ASSERTION_FAILURE;
template <>
struct POCO_STATIC_ASSERTION_FAILURE<true>
{
enum
{
value = 1
};
};
template <int x>
struct poco_static_assert_test
{
};
#if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4))
#define poco_static_assert(B) \
typedef char POCO_JOIN(poco_static_assert_typedef_, __LINE__) \
[POCO_STATIC_ASSERTION_FAILURE<(bool) (B)>::value]
#else
#define poco_static_assert(B) \
typedef poco_static_assert_test<sizeof(POCO_STATIC_ASSERTION_FAILURE<(bool) (B)>)> \
POCO_JOIN(poco_static_assert_typedef_, __LINE__) POCO_UNUSED
#endif
#define poco_static_assert_ptr(T) \
static_assert(std::is_pointer_v<T> || \
std::is_same_v<T, nullptr_t> || \
std::is_member_pointer_v<T> || \
std::is_member_function_pointer_v<T> || \
std::is_member_object_pointer_v<T>, \
"not a pointer")
#endif // Foundation_Bugcheck_INCLUDED