summaryrefslogtreecommitdiffhomepage
path: root/compat/macros.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-11-20 18:50:48 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-11-20 18:50:48 +0100
commitdbb5a9a45b904942c575dce9c0eef9b9e4c91cf2 (patch)
tree86af20fcbcfec33de58e8765e1b5f246bf676e0d /compat/macros.hpp
parentf901df82a04f88f80ed50f8e6f918f8674a544ad (diff)
Revert "compat/macros: pass trivial types by value in cv_qualified<t>"
This reverts commit ede972a70c6d93d68a828b6e84240e1a5fa547a0.
Diffstat (limited to 'compat/macros.hpp')
-rw-r--r--compat/macros.hpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp
index f40d7c7a..497933cf 100644
--- a/compat/macros.hpp
+++ b/compat/macros.hpp
@@ -20,7 +20,6 @@ template<typename t>
using to_const_ref_t = std::add_lvalue_reference_t<std::add_const_t<remove_cvref_t<t>>>;
template<typename t>
-using cv_qualified = std::conditional_t<sizeof(remove_cvref_t<t>) <= sizeof(void*)*4 && std::is_trivially_copyable_v<t> ||
- std::is_fundamental_v<remove_cvref_t<t>>,
+using cv_qualified = std::conditional_t<std::is_fundamental_v<remove_cvref_t<t>>,
remove_cvref_t<t>,
to_const_ref_t<t>>;