Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/observer_variadic_notifi…
Browse files Browse the repository at this point in the history
…ciations' into development
  • Loading branch information
jwellbelove committed Jun 19, 2019
2 parents 1163c67 + 09d96e1 commit 0d25c49
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions include/etl/observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -184,6 +194,8 @@ namespace etl
observer_list[i]->notification(n);
}
}
#endif


protected:

Expand Down
2 changes: 1 addition & 1 deletion include/etl/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 4 additions & 0 deletions support/Release notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
===============================================================================
14.26.6
Added variadic parameters to observer notification.

===============================================================================
14.26.5
Fixed misplaced semicolon in error_handler.h
Expand Down

0 comments on commit 0d25c49

Please sign in to comment.