I'm using the follwing function. but there is a compile error in systemC 2.3. How to fix it?
struct M: sc_module
{
sc_port<i_f, 0> p; // Multiport
sc_event_or_list& all_events() {
sc_event_or_list& or_list = p[0]->event() | p[0]->event();
for (int i = 1; i < p.size(); i++)
or_list | p[i]->event();
return or_list;
}
...
wait(all_events());
...
The compile error is
"error: invalid initialization of non-const reference of type ?sc_core::sc_event_or_list&? from a temporary of type ?sc_core::sc_event_or_expr?"
Thanks,