From df57e1ac65911b96d14d0127e6a1fc8e4a13f7e4 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 3 Nov 2020 09:44:35 +0100 Subject: [PATCH] Code cleanups Mark constexpr booleans as inline. Change-Id: Ib7e0f9d96ff3894b72dcd13c07643ef3b9e6e2c5 Reviewed-by: Fabian Kosmale --- src/corelib/global/qtypeinfo.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index d7cdb8b5d4..04b918f421 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -55,7 +55,7 @@ class QDebug; */ template -static constexpr bool qIsRelocatable = std::is_trivially_copyable_v && std::is_trivially_destructible_v; +inline constexpr bool qIsRelocatable = std::is_trivially_copyable_v && std::is_trivially_destructible_v; /* The catch-all template. @@ -335,17 +335,17 @@ struct is_dereferenceable().operator->() : std::true_type {}; template -constexpr bool is_dereferenceable_v = is_dereferenceable::value; +inline constexpr bool is_dereferenceable_v = is_dereferenceable::value; template struct has_operator_equal : detail::expand_operator_equal {}; template -constexpr bool has_operator_equal_v = has_operator_equal::value; +inline constexpr bool has_operator_equal_v = has_operator_equal::value; template struct has_operator_less_than : detail::expand_operator_less_than {}; template -constexpr bool has_operator_less_than_v = has_operator_less_than::value; +inline constexpr bool has_operator_less_than_v = has_operator_less_than::value; template using compare_eq_result = std::enable_if_t...>, bool>; @@ -368,7 +368,7 @@ template struct has_ostream_operator() << detail::const_reference())>> : std::true_type {}; template -constexpr bool has_ostream_operator_v = has_ostream_operator::value; +inline constexpr bool has_ostream_operator_v = has_ostream_operator::value; template struct has_istream_operator : std::false_type {}; @@ -376,10 +376,10 @@ template struct has_istream_operator() >> detail::reference())>> : std::true_type {}; template -constexpr bool has_istream_operator_v = has_istream_operator::value; +inline constexpr bool has_istream_operator_v = has_istream_operator::value; template -constexpr bool has_stream_operator_v = has_ostream_operator_v && has_istream_operator_v; +inline constexpr bool has_stream_operator_v = has_ostream_operator_v && has_istream_operator_v; }