Re: ObjectHandler::property_t

Posted by Eric Ehlers-3 on
URL: http://quantlib.414.s1.nabble.com/ObjectHandler-property-t-tp17611p17674.html

Hi Jerry,

> I'm trying to create ObjectHandler::property_t variable, which will
> later converted to other library type by ObjectHandler::convert2
>
> e.g.
>
> ObjectHandler::property_t DealMaturityCpp( longTypeVar );
>
> This compiled fine on windows, but failed on Mac with error:
>
> /opt/local/include/boost/variant/variant.hpp:1534:28: Call to member
> function 'initialize' is ambiguous
>
> How should I convert from native type like long, double, bool etc, to
> ObjectHandler::property_t?

Apologies for the delay in getting back to you.  I will try to be
quicker with any follow up.

Above the line of boost code which fails to compile, I find the
following comment:

        // NOTE TO USER :
        // Compile error here indicates that the given type is not
        // unambiguously convertible to one of the variant's types
        // (or that no conversion exists).

But based on the info you provided I don't see why that error occurs.
If the variable called longTypeVar was declared with type long then I
would not expect that error.  Can you provide more information?

Kind Regards,
Eric

------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users