Quantcast
Channel: Aggregate initialization in C++ - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Kaznov for Aggregate initialization in C++

For aggregate initialization you need to initialize the base class, even if it's empty.eventBus->DispatchEvent<CollisionEvent>(Event{}, mEntities[i], mEntities[j]);There were also some changes...

View Article



Aggregate initialization in C++

I have a base class Event, from which concrete events derive:struct Event{};struct CollisionEvent : Event{ //CollisionEvent(Entity entityA, Entity entityB) : entityA(entityA), entityB(entityB) {}...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images