Re: Settings::instance().evaluationDate() produces exception in managed code
Posted by
Boris Skorodumov on
URL: http://quantlib.414.s1.nabble.com/Settings-instance-evaluationDate-produces-exception-in-managed-code-tp7848p7854.html
I just tried your suggestion. It is still the same exception. really weird.
boris.
On Fri, Sep 25, 2009 at 11:08 AM, Luigi Ballabio
<[hidden email]> wrote:
On Thu, 2009-09-24 at 12:12 -0400, boris.skorodumov wrote:
> Below is an example :
> [...]
Hmm. Weird. What happens if you rewrite the instance() method in
singleton.hpp like this?
template <class T>
#if defined(QL_PATCH_MSVC) && defined(_MANAGED)
inline // this seems to be required when CLR support is enabled
#endif
T& Singleton<T>::instance() {
static boost::shared_ptr<T> instance;
if (!instance)
instance = boost::shared_ptr<T>(new T);
return *instance;
}
--
Grabel's Law:
2 is not equal to 3 -- not even for large values of 2.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users