diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2019-09-05 09:58:30 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2019-10-11 16:53:23 +0200 |
commit | 014d7ac65417ed9b5ffb85cca24d16564ff5005a (patch) | |
tree | 3eb24e42350bdbbf731d9300672a7ccdf50b2378 /src/corelib/tools/qtextboundaryfinder.cpp | |
parent | 472f5331ca8091b191944650d043a288dac7c3e8 (diff) |
Q{Shared,Weak}Pointer: Reduce overload sets in implicit conversions
Only allow implicit conversions when the types involved are compatible.
That means, only allow construction and copy assignment when the type
X* is convertible to type T*. This is done using SFINAE and the
std::is_convertible type trait, which makes the previous
QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete.
This patch fixes compilation when a function is overloaded with
Q{Shared,Weak}Pointer of different, incompatible types. Previously, this
resulted in a compilation error due to an ambiguous overload.
Change-Id: I069d22f3582e69842f14284d4f27827326597ca2
Fixes: QTBUG-75222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qtextboundaryfinder.cpp')
0 files changed, 0 insertions, 0 deletions