You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
automaton.cpp: In instantiation of ‘void Automaton<T>::add_edge(unsigned int, bdd, std::set<unsigned int>, std::set<unsigned int>) [with T = spot::
formula]’:
automaton.cpp:22:16: required from here
automaton.cpp:115:28: error: no match for ‘operator[]’ (operand types are ‘std::vector<std::set<unsigned int> >’ and ‘spot::formula’)
115 | (*spot_id_to_slaa_set)[state_name(*(e_this->get_targets().begin()))],
| ~~~~~~~~~~~~~~~~~~~~~~^
If I understand correctly, *spot_id_to_slaa_set is a vector, but Automaton<spot:formula>::state_name() returns a formula, which is not a valid index for a vector. It worked so far because spot::formula was implicitly convertible to bool, which could then be promoted to int, but really this looks like a bug waiting to happen and I'm glad this is now rejected.
I suspect that this part of the function is really only used on Automaton<unsigned> and not Automaton<spot::formula>, so probably it should be defined only for the correct type?
The text was updated successfully, but these errors were encountered:
I recently changed
spot::formula::operator bool()
to become an explicit conversion operator.This apparently prevents
ltl3tela
from compiling.If I understand correctly,
*spot_id_to_slaa_set
is a vector, butAutomaton<spot:formula>::state_name()
returns aformula
, which is not a valid index for a vector. It worked so far becausespot::formula
was implicitly convertible tobool
, which could then be promoted toint
, but really this looks like a bug waiting to happen and I'm glad this is now rejected.I suspect that this part of the function is really only used on
Automaton<unsigned>
and notAutomaton<spot::formula>
, so probably it should be defined only for the correct type?The text was updated successfully, but these errors were encountered: