diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-11-20 18:50:48 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-11-20 18:50:48 +0100 |
commit | dbb5a9a45b904942c575dce9c0eef9b9e4c91cf2 (patch) | |
tree | 86af20fcbcfec33de58e8765e1b5f246bf676e0d | |
parent | f901df82a04f88f80ed50f8e6f918f8674a544ad (diff) |
Revert "compat/macros: pass trivial types by value in cv_qualified<t>"
This reverts commit ede972a70c6d93d68a828b6e84240e1a5fa547a0.
-rw-r--r-- | compat/macros.hpp | 3 |
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>>; |