]> www.ginac.de Git - ginac.git/blobdiff - ginac/archive.cpp
Replace static const variables with constexpr, where applicable.
[ginac.git] / ginac / archive.cpp
index 6a973775005435d5ce3617515f6d4557cfac8ae8..b3eea2bef7c541c34ce30d9376a58a18999f2dfc 100644 (file)
@@ -267,8 +267,8 @@ std::istream &operator>>(std::istream &is, archive &ar)
        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 " + 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)));