|
From: Luigi B. <lui...@gm...> - 2008-01-18 09:20:35
|
On Wed, 2008-01-16 at 18:42 +0000, Eric Ehlers wrote:
> The prerelease files for version 0.9.0 of QuantLibAddin, QuantLibXL,
> ObjectHandler and gensrc are available at this link:
Hi Eric,
if it doesn't break anything, you might want to apply this patch
to ObjectHandler. It fixes a strange problem with the C++ addin. At
least with VC++7 (I didn't check other compilers) if you pass a string
literal to a function expecting a Variant, it calls the Variant(const
bool&) constructor. Why it should think that conversion better than the
std::string one is beyond me...
Luigi
Index: ObjectHandler/oh/variant.hpp
===================================================================
--- ObjectHandler/oh/variant.hpp (revision 14101)
+++ ObjectHandler/oh/variant.hpp (working copy)
@@ -55,6 +55,7 @@
Variant(const long &l) : variant_(l) {}
Variant(const double &d) : variant_(d) {}
Variant(const bool &b) : variant_(b) {}
+ Variant(const char *s) : variant_(std::string(s)) {}
Variant(const std::string &s) : variant_(s) {}
//! \name Inspectors
--
Greenspun's Tenth Rule of Programming:
Any sufficiently complicated C or Fortran program contains an
ad-hoc, informally-specified bug-ridden slow implementation of
half of Common Lisp.
|