QByteArrayView: port IsCompatibleByteTypeHelper from is_same-chain to specialization
Less templates to instantiate, so faster compilation. Pick-to: 6.5 6.2 Change-Id: I0552e496895db2710f33b8fd4b555cfa5c2d8157 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 327e8a904cb8e6665b7e42ae35cdcfd2afc84409) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
44bf5566cb
commit
ced68767da
@ -18,12 +18,11 @@ QT_BEGIN_NAMESPACE
|
||||
namespace QtPrivate {
|
||||
|
||||
template <typename Byte>
|
||||
struct IsCompatibleByteTypeHelper
|
||||
: std::integral_constant<bool,
|
||||
std::is_same_v<Byte, char> ||
|
||||
std::is_same_v<Byte, uchar> ||
|
||||
std::is_same_v<Byte, signed char> ||
|
||||
std::is_same_v<Byte, std::byte>> {};
|
||||
struct IsCompatibleByteTypeHelper : std::false_type {};
|
||||
template <> struct IsCompatibleByteTypeHelper<char> : std::true_type {};
|
||||
template <> struct IsCompatibleByteTypeHelper<signed char> : std::true_type {};
|
||||
template <> struct IsCompatibleByteTypeHelper<unsigned char> : std::true_type {};
|
||||
template <> struct IsCompatibleByteTypeHelper<std::byte> : std::true_type {};
|
||||
|
||||
template <typename Byte>
|
||||
struct IsCompatibleByteType
|
||||
|
Loading…
x
Reference in New Issue
Block a user