|
From: Jerry J. <jer...@gm...> - 2016-08-29 08:36:00
|
Hi Eric
No problem, I've fixed this, it can be closed
using static_case will work in Windows/Mac/Linux
ObjectHandler::property_t propertyVar =
ObjectHandler::property_t(static_cast<long>longTypeVar)
Regards
Jerry
On Mon, Aug 29, 2016 at 4:30 PM, Eric Ehlers <eri...@re...> wrote:
> 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
>
|