mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Added variadic parameters to observer notification.
This commit is contained in:
parent
1163c67cf0
commit
09d96e158e
@ -176,6 +176,16 @@ namespace etl
|
||||
///\tparam TNotification the notification type.
|
||||
///\param n The notification.
|
||||
//*****************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_OBSERVER_FORCE_CPP03)
|
||||
template <typename... TNotification>
|
||||
void notify_observers(TNotification... n)
|
||||
{
|
||||
for (auto observer : observer_list)
|
||||
{
|
||||
observer->notification(n...);
|
||||
}
|
||||
}
|
||||
#else
|
||||
template <typename TNotification>
|
||||
void notify_observers(TNotification n)
|
||||
{
|
||||
@ -184,6 +194,8 @@ namespace etl
|
||||
observer_list[i]->notification(n);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
#define ETL_VERSION_MAJOR 14
|
||||
#define ETL_VERSION_MINOR 26
|
||||
#define ETL_VERSION_PATCH 5
|
||||
#define ETL_VERSION_PATCH 6
|
||||
|
||||
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) ETL_STRINGIFY(ETL_VERSION_MINOR) ETL_STRINGIFY(ETL_VERSION_PATCH)
|
||||
#define ETL_VERSION_W ETL_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH))
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
===============================================================================
|
||||
14.26.6
|
||||
Added variadic parameters to observer notification.
|
||||
|
||||
===============================================================================
|
||||
14.26.5
|
||||
Fixed misplaced semicolon in error_handler.h
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user