Hi,

I have construct of the form

value=message.getProperties()["property"];

The expected property type is uint32. The value type has up until now been "unsigned int", so (obviously) the call has worked just fine. But then I changed it to a double (because I want to use it as a floating-point later), and it will no longer work - get and " InvalidConversion" exception with the message "Cannot convert from uint32 to double (qpid/types/Variant.cpp:488)". This rather surprised me; I can easily work around this, but why isn't an integer variant convertible to a floating-point value?

Also, when doing some more tests, I realised that I also get an exception when the property is missing. This was also not quite what I expected, either - based on experience with "variant" types in other libraries, I assumed that an "empty" variant would be convertible to most types - giving a 0 or default-constructed value. Comments?

QPid version is 0.22.

- Toralf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to