Commit ac6b042e authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

remove a GCC 4.6 workaround

* src/twa/twagraph.hh (namer): Use a template alias instead
of a trait.
* src/twa/, src/parseaut/parseaut.yy,
src/twaalgos/ Adjust.
parent 304f2496
......@@ -49,7 +49,7 @@
typedef std::map<std::string, bdd> formula_cache;
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
// automata, it tries hard to recover from errors, so that we get a
......@@ -24,8 +24,8 @@
namespace spot
twa_graph::release_formula_namer(typename namer<const ltl::formula*>::type*
namer, bool keep_names)
twa_graph::release_formula_namer(namer<const ltl::formula*>* namer,
bool keep_names)
if (keep_names)
......@@ -204,34 +204,30 @@ namespace spot
last_support_conditions_input_ = 0;
// FIXME: Once we ditch GCC 4.6, we can using a template aliases
// (supported from GCC 4.7 onward) instead of this.
#ifndef SWIG
template <typename State_Name,
typename Name_Hash = std::hash<State_Name>,
typename Name_Equal = std::equal_to<State_Name>>
struct namer
typedef named_graph<graph_t, State_Name, Name_Hash, Name_Equal> type;
using namer = named_graph<graph_t, State_Name, Name_Hash, Name_Equal>;
template <typename State_Name,
typename Name_Hash = std::hash<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>*
return new named_graph<graph_t, State_Name, Name_Hash, Name_Equal>(g_);
typename namer<const ltl::formula*>::type*
namer<const ltl::formula*>*
return create_namer<const ltl::formula*>();
release_formula_namer(typename namer<const ltl::formula*>::type* namer,
bool keep_names);
release_formula_namer(namer<const ltl::formula*>* namer, bool keep_names);
graph_t& get_graph()
......@@ -110,7 +110,7 @@ namespace spot
class ratexp_to_dfa
typedef typename twa_graph::namer<const formula*>::type namer;
typedef twa_graph::namer<const formula*> namer;
ratexp_to_dfa(translate_dict& dict);
std::tuple<const_twa_graph_ptr, const namer*, const state*>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment