QuantLib'ers,
I was updating the Debian packages of 0.3.11 ( for a C++ transition we're
undergoing relative to to libstd++ and the standard allocation, details at
http://article.gmane.org/gmane.linux.debian.devel.announce/763 ), and I ran
into
Making install in TermStructures
make[4]: Entering directory `/tmp/buildd/quantlib-0.3.11/ql/TermStructures'
if /bin/sh ../../libtool --tag=CXX --mode=compile g++-4.0 -DHAVE_CONFIG_H
-I. -I. -I../../ql -I../.. -I../.. -O2 -D_REENTRANT -MT ratehelpers.lo -MD
-MP -MF ".deps/ratehelpers.Tpo" -c -o ratehelpers.lo ratehelpers.cpp; \
then mv -f ".deps/ratehelpers.Tpo" ".deps/ratehelpers.Plo"; else rm -f
".deps/ratehelpers.Tpo"; exit 1; fi
g++-4.0 -DHAVE_CONFIG_H -I. -I. -I../../ql -I../.. -I../.. -O2 -D_REENTRANT
-MT ratehelpers.lo -MD -MP -MF .deps/ratehelpers.Tpo -c ratehelpers.cpp
-fPIC -DPIC -o .libs/ratehelpers.o
../../ql/quote.hpp: In member function 'QuantLib::Real
QuantLib::DerivedQuote<UnaryFunction>::value() const':
../../ql/quote.hpp:139: error: there are no arguments to 'QL_REQUIRE' that
depend on a template parameter, so a declaration of 'QL_REQUIRE' must be
available
../../ql/quote.hpp:139: error: (if you use '-fpermissive', G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
../../ql/quote.hpp: In member function 'QuantLib::Real
QuantLib::CompositeQuote<BinaryFunction>::value() const':
../../ql/quote.hpp:164: error: there are no arguments to 'QL_REQUIRE' that
depend on a template parameter, so a declaration of 'QL_REQUIRE' must be
available
It turns out that the suggested '-fpermissive' fixes it. From my build-logs,
it worked fine without it on Oct 21 with the then-current g++-4.0 (4.0.2-2,
judging from its changelog). The current one is 4.0.2-4 with the changed
allocator, and something must have changed along with it.
But then given the speed with which things move around here, it probably has
long been updated in CVS anyway :)
Cheers, Dirk
--
Statistics: The (futile) attempt to offer certainty about uncertainty.
-- Roger Koenker, 'Dictionary of Received Ideas of Statistics'