// helpers
static tinfo_t get_tinfo() { return reg_info.options.get_id(); }
static const char *get_class_name() { return "structure"; }
- static tinfo_t next_structure_tinfo_key() { return new tinfo_static_t; }
// constructors
public:
// pattern matching
bool has(const ex & other, unsigned options = 0) const { return inherited::has(other, options); }
- bool match(const ex & pattern, lst & repl_lst) const { return inherited::match(pattern, repl_lst); }
+ bool match(const ex & pattern, exmap& repl_lst) const { return inherited::match(pattern, repl_lst); }
protected:
bool match_same_type(const basic & other) const { return true; }
public:
// noncommutativity
unsigned return_type() const { return return_types::commutative; }
- tinfo_t return_type_tinfo() const { return this; }
+ return_type_t return_type_tinfo() const
+ {
+ return_type_t r;
+ r.rl = 0;
+ r.tinfo = &typeid(*this);
+ return r;
+ }
protected:
bool is_equal_same_type(const basic & other) const
}
template <class T, template <class> class CP>
-registered_class_info structure<T, CP>::reg_info = registered_class_info(registered_class_options(structure::get_class_name(), "basic", structure::next_structure_tinfo_key(), &structure::unarchive));
+registered_class_info structure<T, CP>::reg_info = registered_class_info(registered_class_options(structure::get_class_name(), "basic", typeid(structure<T, CP>), &structure::unarchive));
} // namespace GiNaC