Resolve symbol ambiguity when building with Unity Build
In unity build, we may get `error: reference to 'detail' is ambiguous` between the `detail` namespace defined in `qpropertyprivate.h`, and `qflatmap_p.h`. For now, this causes an issue during the compilation of `qcalendar.cpp` and it may occur in other places where qflatmap is included. Task-number: QTBUG-109394 Change-Id: Ie4bbb66543d26a5db58488e924333d98ce0adebf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit a0923d5d3a4fa1dd03075aa50766224ac1d6e103) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
fb2cdafe98
commit
ddc6eddf77
@ -83,6 +83,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace qflatmap {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
template <class T>
|
template <class T>
|
||||||
class QFlatMapMockPointer
|
class QFlatMapMockPointer
|
||||||
@ -100,6 +101,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
} // namespace qflatmap
|
||||||
|
|
||||||
template<class Key, class T, class Compare = std::less<Key>, class KeyContainer = QList<Key>,
|
template<class Key, class T, class Compare = std::less<Key>, class KeyContainer = QList<Key>,
|
||||||
class MappedContainer = QList<T>>
|
class MappedContainer = QList<T>>
|
||||||
@ -107,8 +109,9 @@ class QFlatMap : private QFlatMapValueCompare<Key, T, Compare>
|
|||||||
{
|
{
|
||||||
static_assert(std::is_nothrow_destructible_v<T>, "Types with throwing destructors are not supported in Qt containers.");
|
static_assert(std::is_nothrow_destructible_v<T>, "Types with throwing destructors are not supported in Qt containers.");
|
||||||
|
|
||||||
template <class U>
|
template<class U>
|
||||||
using mock_pointer = detail::QFlatMapMockPointer<U>;
|
using mock_pointer = qflatmap::detail::QFlatMapMockPointer<U>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using key_type = Key;
|
using key_type = Key;
|
||||||
using mapped_type = T;
|
using mapped_type = T;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user