|
From: Mark j. <mar...@gm...> - 2009-03-04 00:41:12
|
As far as I can tell the type of Size is const unsigned __int64 I am never very keen on using code with __ in it. What do you think? Mark 2009/3/4 Luigi Ballabio <lui...@gm...>: > On Tue, 2009-03-03 at 17:00 +1100, Mark joshi wrote: >> OK i've committed a new version that works with x64. > > Good, thanks. > >> I've added a preprocessor macro x64 to indicate that building is under x64. >> >> I've removed the default value for the null template and added >> specializations for array and IntervalPrice. >> I've put the specializations for these in their header files rather >> than in null.hpp since this makes more >> sense from a levelization viewpoint (and I couldn't get it to compile >> with them null.hpp.) > > True. I've just moved the Date specialization to date.hpp as well. > > >> I've also added a specialization under x64 only for Size. > > This works, but I'm still curious about what native type Size actually > is (it's typedef to size_t, but that's not native either.) I'd rather > specialize the template for the native type, to reduce the risk of > conflicts between specializations. May you run the preprocessor on > types.hpp and see how size_t is defined? I don't know how to do it from > the IDE---you'll probably have to call the x64 compiler from the command > line (see <http://msdn.microsoft.com/en-us/library/x4d2c09s.aspx>) as > > cd path/to/QuantLib > cl /E /I. /Ipath/to/boost ql\types.hpp > types.pp > > You'll get a truckload of code. After that, look for size_t in types.pp. > > >> I'll look into dealing with the lexical_cast issue. > > Ok, thanks. > > Luigi > > > -- > > The wisdom of the wise and the experience of the ages are perpetuated > by quotations. > -- Benjamin Disraeli > > > -- Quant Job Interview Questions and Answers is now out: www.markjoshi.com Assoc Prof Mark Joshi Centre for Actuarial Studies University of Melbourne My website is www.markjoshi.com |