main.cpp: In member function ‘std::set<State> State::getTransitionToSymbol(char) const’:
main.cpp:39:20: error: could not convert ‘((const State*)this)->State::trans.std::map<_Key, _Tp, _Compare, _Alloc>::find, std::less, std::allocator > > >(symbol).std::_Rb_tree_const_iterator<_Tp>::operator* > >()’ from ‘const std::pair >’ to ‘std::set’
return *(trans.find(symbol));
^~~~~~~~~~~~~~~~~~~~~
main.cpp: At global scope:
std::map::find() returns an iterator to the map element. The element is a std::pair, but you're tring to return it as if it were the value part of a key-value pair.