#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include "tostring.h"
#include "version.h"
#include <iostream>
is.get(c1); is.get(c2); is.get(c3); is.get(c4);
if (c1 != 'G' || c2 != 'A' || c3 != 'R' || c4 != 'C')
throw (std::runtime_error("not a GiNaC archive (signature not found)"));
- static const unsigned max_version = GINACLIB_ARCHIVE_VERSION;
- static const unsigned min_version = GINACLIB_ARCHIVE_VERSION - GINACLIB_ARCHIVE_AGE;
+ constexpr unsigned max_version = GINACLIB_ARCHIVE_VERSION;
+ constexpr unsigned min_version = GINACLIB_ARCHIVE_VERSION - GINACLIB_ARCHIVE_AGE;
unsigned version = read_unsigned(is);
if ((version > max_version) || (version < min_version))
- throw (std::runtime_error("archive version " + ToString(version) + " cannot be read by this GiNaC library (which supports versions " + ToString(min_version) + " thru " + ToString(max_version)));
+ throw (std::runtime_error("archive version " + std::to_string(version) + " cannot be read by this GiNaC library (which supports versions " + std::to_string(min_version) + " thru " + std::to_string(max_version)));
// Read atoms
unsigned num_atoms = read_unsigned(is);
}
}
-/** Create a dummy archive. The intention is to fill archive_node's default
- * ctor, which is currently a Cint-requirement. */
-archive* archive_node::dummy_ar_creator()
-{
- static archive* some_ar = new archive;
- return some_ar;
-}
-
} // namespace GiNaC