Closed jonesmz closed 4 years ago
Hi, Michael!
The workaround that you mentioned is one of the ways how it may be solved, since nobody but you can decide which implementation of size()
should be used. As an alternative, you can try using std::basic_string_view<CHAR_T>::size
statement inside your type definition to tell the compiler which function should be called. The other way is to use the dedicated customization point of the library - ozo::send_impl template specialization which in your case just should be inherited from ozo::send_impl<std::basic_string_view<CHAR_T>>
and the conflict shall be resolved via implicit cast of BasicSharedString to std::basic_string_view<CHAR_T>
.
I hope that helps. With best regards Sergei
BTW, Michael, why did you decide inheritance
class BasicSharedString : public std::basic_string_view<CHAR_T>
, private boost::shared_ptr<CHAR_T[]>
{ /* ... */ };
instead of aggregation:
class BasicSharedString : public std::basic_string_view<CHAR_T>
{
boost::shared_ptr<CHAR_T[]> buf_;
/* ... */ };
?
No meaningful reason.
It does help slightly with the order of initialization for the member variables and base classes though.
I have a class:
I've provided an adapter for this class to OZO.
When I use it in a query, I get this error:
And these candidate functions:
One from standard library
One from Boost.
I can work around this problem by providing the function "size" in the same namespace as my custom type.
But I would really rather not have to do this.
Is this the intended behavior of OZO? If not, can any adjustments be made?