@@ -219,7 +219,11 @@ namespace mpm
219219 // ! The type of the Allocator used by this eventbus
220220 using allocator_type = Allocator;
221221
222+ // ! Delegates to basic_eventbus(allocator_type) using
223+ // ! default construction for the allocator_type instance.
222224 basic_eventbus ();
225+
226+ // ! Constructs an instance using the supplied allocator_type.
223227 explicit basic_eventbus (allocator_type alloc);
224228
225229# ifdef DOCS
@@ -229,9 +233,10 @@ namespace mpm
229233 // ! The if the Event type provides a nested type called dispatch_as
230234 // ! that is a mpm::typelist, then the supplied event instance
231235 // ! will be delivered to event handlers registered for all of the
232- // ! types in the list.
236+ // ! types in the list and also as E. Otherwise it will be delivered
237+ // ! only as E.
233238 // !
234- // ! \tparam E Any CopyConstructible class type
239+ // ! \tparam E An instance of the Event concept
235240 // ! \param event The event to publish
236241 // ! \returns void
237242 template <typename E>
@@ -255,12 +260,11 @@ namespace mpm
255260 // ! Subscribe to instances of Event
256261 // !
257262 // ! The supplied handler will be invoked when events of type Event
258- // ! are published or when derived classes of Event that have chosen
263+ // ! are published or when classes derived from Event that have chosen
259264 // ! to enable polymorphic dispatch are published.
260265 // !
261- // ! \tparam Event The Event type for which to subscribe
262- // ! \tparam EventHandler a noexcept Unary FunctionObject such that
263- // ! handler(const Event&) is a valid expression
266+ // ! \tparam Event The type for which to subscribe
267+ // ! \tparam EventHandler an instance of the EventHandler concept
264268 // ! \param handler An instance of EventHandler
265269 // ! \returns A cookie which will allow for this handler to be
266270 // ! unsubscribed later via basic_eventbus::unsubscribe
@@ -297,7 +301,7 @@ namespace mpm
297301
298302 template <typename A>
299303 basic_eventbus<A>::basic_eventbus(allocator_type alloc)
300- : m_alloc{alloc}
304+ : m_alloc{ std::move ( alloc) }
301305 , m_subscriptions{in_place, alloc}
302306 {
303307 }
@@ -392,7 +396,7 @@ namespace mpm
392396 scoped_subscription () = default ;
393397
394398 // ! Move from another scoped_subscription.
395- scoped_subscription (scoped_subscription&& other)
399+ scoped_subscription (scoped_subscription&& other) noexcept
396400 : m_ebus{other.m_ebus }
397401 , m_cookie{other.m_cookie }
398402 {
@@ -403,7 +407,7 @@ namespace mpm
403407 scoped_subscription (const scoped_subscription&) = delete ;
404408
405409 // ! Move-assign from another scoped_subscription
406- scoped_subscription& operator =(scoped_subscription&& other)
410+ scoped_subscription& operator =(scoped_subscription&& other) noexcept
407411 {
408412 reset ();
409413 m_ebus = other.m_ebus ;
@@ -412,7 +416,7 @@ namespace mpm
412416 }
413417
414418
415- void swap (scoped_subscription& other)
419+ void swap (scoped_subscription& other) noexcept
416420 {
417421 using std::swap;
418422 swap (m_ebus, other.m_ebus );
0 commit comments