[GiNaC-list] Namespace error with is_ex_the_function
Jacob Garber
jgarber1 at ualberta.ca
Sun Oct 18 23:12:09 CEST 2015
Hello,
The following program
#include <iostream>
#include <ginac/ginac.h>
int main() {
GiNaC::symbol x("x");
std::cout << GiNaC::is_ex_the_function(x, GiNaC::sin) << std::endl;
}
gives me a compilation error:
bug.cpp:6:24: error: unexpected parenthesis after '::'
std::cout << GiNaC::is_ex_the_function(x, GiNaC::sin) << std::endl;
^
/usr/local/include/ginac/function.h:767:43: note: expanded from macro 'is_ex_the_function'
#define is_ex_the_function(OBJ, FUNCNAME) (GiNaC::is_the_function<FUNCNAME##_SERIAL>(OBJ))
^
bug.cpp:6:17: error: no member named 'GiNaC' in namespace 'GiNaC'; did you mean simply 'GiNaC'?
std::cout << GiNaC::is_ex_the_function(x, GiNaC::sin) << std::endl;
^
/usr/local/include/ginac/parser.h:31:11: note: 'GiNaC' declared here
namespace GiNaC {
^
bug.cpp:6:24: error: expected ';' after expression
std::cout << GiNaC::is_ex_the_function(x, GiNaC::sin) << std::endl;
^
/usr/local/include/ginac/function.h:767:90: note: expanded from macro 'is_ex_the_function'
#define is_ex_the_function(OBJ, FUNCNAME) (GiNaC::is_the_function<FUNCNAME##_SERIAL>(OBJ))
^
bug.cpp:6:24: error: expected expression
/usr/local/include/ginac/function.h:767:90: note: expanded from macro 'is_ex_the_function'
#define is_ex_the_function(OBJ, FUNCNAME) (GiNaC::is_the_function<FUNCNAME##_SERIAL>(OBJ))
^
4 errors generated.
This is with GiNaC 1.6.5 on Mac OS 10.11, with compiler Apple version 7.0.0. It seems there is an issue with the namespace. Removing `GiNaC::` from `is_ex_the_function` compiles fine. Anyone else have this?
Cheers,
Jacob Garber
More information about the GiNaC-list
mailing list