]> www.ginac.de Git - ginac.git/commitdiff
Make C++ files in doc/examples/ compile again.
authorRichard Kreckel <kreckel@ginac.de>
Thu, 9 Apr 2020 19:23:25 +0000 (21:23 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 9 Apr 2020 19:29:49 +0000 (21:29 +0200)
doc/examples/archive1.cpp
doc/examples/lanczos.cpp
doc/examples/mystring.cpp

index c20db620a71d16e7305ae36c23deb7122e274e40..6361beccd60fa7d75d140e44b28b12597a1bf8d9 100644 (file)
@@ -32,8 +32,7 @@ int main()
        ifstream in("foobar.gar");
        in >> a2;
 
        ifstream in("foobar.gar");
        in >> a2;
 
-       lst syms;
-       syms = x, y;
+       lst syms = {x, y};
 
        ex ex1 = a2.unarchive_ex(syms, "foo");
        ex ex2 = a2.unarchive_ex(syms, "the second one");
 
        ex ex1 = a2.unarchive_ex(syms, "foo");
        ex ex2 = a2.unarchive_ex(syms, "the second one");
index 627bb3f87865bb2c79174b0d0e3012fbaad4b124..dcad1cb80beda81865a62f510ca906f759b882e8 100644 (file)
@@ -48,6 +48,7 @@
  * MA  02110-1301 USA
  */
 
  * MA  02110-1301 USA
  */
 
+#include <getopt.h>
 #include <vector>
 #include <cstddef> // for size_t
 #include <iostream>
 #include <vector>
 #include <cstddef> // for size_t
 #include <iostream>
index bcbf96a889c84e748bce606bae5b18f48ad1a3d5..56c844d2cae5401afc801f43edb7807d1585db20 100644 (file)
@@ -14,7 +14,7 @@ class mystring : public basic
        GINAC_DECLARE_REGISTERED_CLASS(mystring, basic)
 public:
        mystring(const string &s);
        GINAC_DECLARE_REGISTERED_CLASS(mystring, basic)
 public:
        mystring(const string &s);
-       ex eval(int level) const override;
+       ex eval() const override;
 private:
        string str;
 
 private:
        string str;
 
@@ -54,7 +54,7 @@ void mystring::do_print(const print_context &c, unsigned level) const
  * evaluation: all strings automatically converted to lowercase with
  * non-alphabetic characters stripped, and empty strings removed
  */
  * evaluation: all strings automatically converted to lowercase with
  * non-alphabetic characters stripped, and empty strings removed
  */
-ex mystring::eval(int level) const
+ex mystring::eval() const
 {
        string new_str;
        for (size_t i=0; i<str.length(); i++) {
 {
        string new_str;
        for (size_t i=0; i<str.length(); i++) {