remove a GCC 4.6 workaround
* src/twa/twagraph.hh (namer): Use a template alias instead of a trait. * src/twa/twagraph.cc, src/parseaut/parseaut.yy, src/twaalgos/ltl2tgba_fm.cc: Adjust.
This commit is contained in:
parent
304f2496ea
commit
ac6b042e2c
4 changed files with 10 additions and 14 deletions
|
|
@ -49,7 +49,7 @@
|
||||||
typedef std::map<std::string, bdd> formula_cache;
|
typedef std::map<std::string, bdd> formula_cache;
|
||||||
|
|
||||||
typedef std::pair<int, std::string*> pair;
|
typedef std::pair<int, std::string*> pair;
|
||||||
typedef typename spot::twa_graph::namer<std::string>::type named_tgba_t;
|
typedef spot::twa_graph::namer<std::string> named_tgba_t;
|
||||||
|
|
||||||
// Note: because this parser is meant to be used on a stream of
|
// Note: because this parser is meant to be used on a stream of
|
||||||
// automata, it tries hard to recover from errors, so that we get a
|
// automata, it tries hard to recover from errors, so that we get a
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
void
|
void
|
||||||
twa_graph::release_formula_namer(typename namer<const ltl::formula*>::type*
|
twa_graph::release_formula_namer(namer<const ltl::formula*>* namer,
|
||||||
namer, bool keep_names)
|
bool keep_names)
|
||||||
{
|
{
|
||||||
if (keep_names)
|
if (keep_names)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -204,34 +204,30 @@ namespace spot
|
||||||
last_support_conditions_input_ = 0;
|
last_support_conditions_input_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Once we ditch GCC 4.6, we can using a template aliases
|
#ifndef SWIG
|
||||||
// (supported from GCC 4.7 onward) instead of this.
|
|
||||||
template <typename State_Name,
|
template <typename State_Name,
|
||||||
typename Name_Hash = std::hash<State_Name>,
|
typename Name_Hash = std::hash<State_Name>,
|
||||||
typename Name_Equal = std::equal_to<State_Name>>
|
typename Name_Equal = std::equal_to<State_Name>>
|
||||||
struct namer
|
using namer = named_graph<graph_t, State_Name, Name_Hash, Name_Equal>;
|
||||||
{
|
|
||||||
typedef named_graph<graph_t, State_Name, Name_Hash, Name_Equal> type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename State_Name,
|
template <typename State_Name,
|
||||||
typename Name_Hash = std::hash<State_Name>,
|
typename Name_Hash = std::hash<State_Name>,
|
||||||
typename Name_Equal = std::equal_to<State_Name>>
|
typename Name_Equal = std::equal_to<State_Name>>
|
||||||
typename namer<State_Name, Name_Hash, Name_Equal>::type*
|
namer<State_Name, Name_Hash, Name_Equal>*
|
||||||
create_namer()
|
create_namer()
|
||||||
{
|
{
|
||||||
return new named_graph<graph_t, State_Name, Name_Hash, Name_Equal>(g_);
|
return new named_graph<graph_t, State_Name, Name_Hash, Name_Equal>(g_);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename namer<const ltl::formula*>::type*
|
namer<const ltl::formula*>*
|
||||||
create_formula_namer()
|
create_formula_namer()
|
||||||
{
|
{
|
||||||
return create_namer<const ltl::formula*>();
|
return create_namer<const ltl::formula*>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
release_formula_namer(typename namer<const ltl::formula*>::type* namer,
|
release_formula_namer(namer<const ltl::formula*>* namer, bool keep_names);
|
||||||
bool keep_names);
|
#endif
|
||||||
|
|
||||||
graph_t& get_graph()
|
graph_t& get_graph()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ namespace spot
|
||||||
|
|
||||||
class ratexp_to_dfa
|
class ratexp_to_dfa
|
||||||
{
|
{
|
||||||
typedef typename twa_graph::namer<const formula*>::type namer;
|
typedef twa_graph::namer<const formula*> namer;
|
||||||
public:
|
public:
|
||||||
ratexp_to_dfa(translate_dict& dict);
|
ratexp_to_dfa(translate_dict& dict);
|
||||||
std::tuple<const_twa_graph_ptr, const namer*, const state*>
|
std::tuple<const_twa_graph_ptr, const namer*, const state*>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue