I have a problem with useRef(const & MyType), where MyType is my custom class, with TypeHandlers, as described in section "Complex Data Types" of the guide. Note that I am using version 1.5.
The code builds (and works) fine with non-constant objects, using both use(&MyType) and useRef(&MyType), but fails when I try to read from a constant object using useRef(const & MyType).
The gcc log is:
- Code: Select all
||=== MySQL with POCO, Debug ===|
.../Poco/Data/Binding.h|110| required from ‘void Poco::Data::Binding<T>::bind(std::size_t) [with T = const std::vector<MyType>; std::size_t = unsigned int]’|
.../main.cpp|235| required from here|
.../Poco/Data/TypeHandler.h|143|error: call of overloaded ‘bind(std::size_t&, const std::vector<MyType>&, Poco::Data::AbstractBinder::Direction&)’ is ambiguous|
.../Poco/Data/TypeHandler.h|143|note: candidates are:|
.../Poco/Data/AbstractBinder.h|339|note: void Poco::Data::AbstractBinder::bind(std::size_t, const Poco::Any&, Poco::Data::AbstractBinder::Direction)|
.../Poco/Data/AbstractBinder.h|342|note: void Poco::Data::AbstractBinder::bind(std::size_t, const Poco::Dynamic::Var&, Poco::Data::AbstractBinder::Direction)|
||=== Build finished: 6 errors, 0 warnings ===|
To me, this looks like a bug in the library, possibly caused by the change from Poco::Any to Poco::Dynamic::Var - or am I wrong and it is my error?
Thanks.
Michal





