From the error message I can conclude that there are two constructors applyable - which one is the correct one? E.g. casting 0 to ex (changing
Hi, I am trying to compile GiNaC under OS X with clang++ and the usage of libc++ (this is required, as my project, where I want to include GiNaC requires the c++11 standard). Therefore I added the following configuration options: ./configure CXX=/usr/bin/clang++ CXXFLAGS="-std=c++11 -stdlib=libc++" LDFLAGS="-stdlib=libc++" Upon invoking make I get an error regarding an ambiguous conversion in multiple lines: inifcns_nstdsums.cpp:2604:18: error: ambiguous conversion for functional-style cast from 'int' to 'lst' (aka 'container<std::list>') return e * (-H(lst(0),1/arg).hold()); ^~~~~ ./container.h:145:2: note: candidate constructor container(STLT const & s, bool discardable = false) ^ ./container.h:167:11: note: candidate constructor explicit container(const ex & p1) All errors are in the above file inifcns_nstdsums.cpp and occur with the same cast: H(lst(0),1/arg).hold() the line to: H(lst( ex(0) ),1/arg).hold() solves the error - is this the correct cast or is the other cast the correct one? Best Stefan
Hi, On 10/23/2013 09:42 AM, Stefan Schupp wrote:
Upon invoking make I get an error regarding an ambiguous conversion in multiple lines:
inifcns_nstdsums.cpp:2604:18: error: ambiguous conversion for functional-style cast from 'int' to 'lst' (aka 'container<std::list>') return e * (-H(lst(0),1/arg).hold()); ^~~~~ ./container.h:145:2: note: candidate constructor container(STLT const & s, bool discardable = false) ^ ./container.h:167:11: note: candidate constructor explicit container(const ex & p1)
All errors are in the above file inifcns_nstdsums.cpp and occur with the same cast:
H(lst(0),1/arg).hold()
From the error message I can conclude that there are two constructors applyable - which one is the correct one? E.g. casting 0 to ex (changing the line to: H(lst( ex(0) ),1/arg).hold() solves the error - is this the correct cast or is the other cast the correct one?
According to the manual, the harmonic polylogarithm H expects a general lst as first argument. So, lst(ex(0)) is correct and lst(int(0)) would be incorrect. But I wonder why this clarification is needed. IMHO, the first candidate shouldn't be considered, if the std::list<T>(T) ctor is explicit, or am I missing something? Does the attached patch work for you? Bye -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
participants (2)
-
Richard B. Kreckel
-
Stefan Schupp