Issue was reported by Warren Weckesser.
Signed-off-by: Vladimir V. Kisil <V.Kisilv@leeds.ac.uk>
@example
static void my_print(const ex & e)
@{
@example
static void my_print(const ex & e)
@{
- if (is_a<function>(e))
- cout << ex_to<function>(e).get_name();
+ if (is_a<GiNaC::function>(e))
+ cout << ex_to<GiNaC::function>(e).get_name();
else
cout << ex_to<basic>(e).class_name();
cout << "(";
else
cout << ex_to<basic>(e).class_name();
cout << "(";
- my_print(pow(3, x) - 2 * sin(y / Pi)); cout << endl;
+ symbol x("x"), y("y");
+ my_print(pow(3, x) - 2 * sin(y / Pi));
+ cout << endl;
return 0;
@}
@end example
return 0;
@}
@end example
+(Note that we have added the namespace resolution to the @code{GiNaC::function}
+class to avoid modern compilers' confusion with @code{std::function}.)
+
This will produce
@example
This will produce
@example