From: Richard Kreckel Date: Thu, 9 Apr 2020 19:23:25 +0000 (+0200) Subject: Make C++ files in doc/examples/ compile again. X-Git-Tag: release_1-7-9~4 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=aac4cec4d116f0b39daddb35181d1aa85297d4ba;hp=f7dc280e991f5151beed5aadd5d3641743e7dc9b Make C++ files in doc/examples/ compile again. --- diff --git a/doc/examples/archive1.cpp b/doc/examples/archive1.cpp index c20db620..6361becc 100644 --- a/doc/examples/archive1.cpp +++ b/doc/examples/archive1.cpp @@ -32,8 +32,7 @@ int main() 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"); diff --git a/doc/examples/lanczos.cpp b/doc/examples/lanczos.cpp index 627bb3f8..dcad1cb8 100644 --- a/doc/examples/lanczos.cpp +++ b/doc/examples/lanczos.cpp @@ -48,6 +48,7 @@ * MA 02110-1301 USA */ +#include #include #include // for size_t #include diff --git a/doc/examples/mystring.cpp b/doc/examples/mystring.cpp index bcbf96a8..56c844d2 100644 --- a/doc/examples/mystring.cpp +++ b/doc/examples/mystring.cpp @@ -14,7 +14,7 @@ class mystring : public basic GINAC_DECLARE_REGISTERED_CLASS(mystring, basic) public: mystring(const string &s); - ex eval(int level) const override; + ex eval() const override; 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 */ -ex mystring::eval(int level) const +ex mystring::eval() const { string new_str; for (size_t i=0; i