Login  Register

Re: Linuc/gcc port (nearly done)

Posted by Luigi Ballabio-3 on Dec 15, 2000; 7:04pm
URL: http://quantlib.414.s1.nabble.com/Linuc-gcc-port-nearly-done-tp9941p9942.html

At 04:00 PM 12/15/00 +0100, Peter Schmitteckert wrote:

>this morniung I adapted your QuantLib 0.0.1 Source
>to compile on my Linux 2.2.17 using
>gcc 2.95.2.
>The only problem I've encountered ist in "cranknicolson.h":
>
>         template <int constant>
>         class CrankNicolsonTimeSetter {};
>
>Here you specify a templated class without using the
>template parameter. In my opinion I can't blame g++
>for not compiling this, since according to my
>Stroustrup v3, this is not valid C++.

Peter,
         I'm the guilty party for that declaration - and unfortunately I
don't have my Stroustroup here. I'll try and check whether that is legal
code - but if it can be made legal for all compilers by writing it as

         template <int constant>
         class CrankNicolsonTimeSetter {
             enum { isTimeDependent = constant };
         };

just go ahead and do it with my blessing :)

Other issues: first of all, thanks again for the porting (by the way, did
that include the Python module as well?)
On <limits> and <sstream>: they were the main problems also in our
own  attemps (kind of weak ones, actually) to get it to compile with g++.
What I had in mind but didn't have the time to implement was that the use
of sstream should be confined to dataformatters.h/cpp - and there we could
use the good old sprintf instead. Is that what you have done? For what
concerns limits, I had barely started to think about it. But now I guess
I'll just look at your code :)

Bye for now,
                 Luigi