From e455b8fcbb2788d437a7d212811bb5ba171e0cd4 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Tue, 10 Apr 2001 13:47:03 +0000 Subject: [PATCH] * introduced typedef propinfovector in order to please Cint. --- ginac/archive.cpp | 4 ++-- ginac/archive.h | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ginac/archive.cpp b/ginac/archive.cpp index 43b2667c..3ce4ec65 100644 --- a/ginac/archive.cpp +++ b/ginac/archive.cpp @@ -457,7 +457,7 @@ const archive_node &archive_node::find_ex_node(const std::string &name, unsigned } -void archive_node::get_properties(std::vector &v) const +void archive_node::get_properties(propinfovector &v) const { v.clear(); std::vector::const_iterator i = props.begin(), iend = props.end(); @@ -465,7 +465,7 @@ void archive_node::get_properties(std::vector &v) c property_type type = i->type; string name = a.unatomize(i->name); - std::vector::iterator a = v.begin(), aend = v.end(); + propinfovector::iterator a = v.begin(), aend = v.end(); bool found = false; while (a != aend) { if (a->type == type && a->name == name) { diff --git a/ginac/archive.h b/ginac/archive.h index c5030eb5..96a6ea1c 100644 --- a/ginac/archive.h +++ b/ginac/archive.h @@ -74,6 +74,13 @@ public: std::string name; /**< Name of property. */ unsigned count; /**< Number of occurrences. */ }; + // Cint doesn't like vector<..,default_alloc> but malloc_alloc is + // unstandardized and not supported by newer GCCs. +#if defined(__GNUC__) && ((__GNUC__ == 2) && (__GNUC_MINOR__ < 97)) + typedef std::vector propinfovector; +#else + typedef std::vector propinfovector; +#endif archive_node() : a(*dummy_ar_creator()), has_expression(false) {} // hack for cint which always requires a default constructor archive_node(archive &ar) : a(ar), has_expression(false) {} @@ -116,7 +123,7 @@ public: const archive_node &find_ex_node(const std::string &name, unsigned int index = 0) const; /** Return vector of properties stored in node. */ - void get_properties(std::vector &v) const; + void get_properties(propinfovector &v) const; ex unarchive(const lst &sym_lst) const; bool has_same_ex_as(const archive_node &other) const; -- 2.46.2