diff options
Diffstat (limited to 'compat/macros.hpp')
-rw-r--r-- | compat/macros.hpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp deleted file mode 100644 index 497933cf..00000000 --- a/compat/macros.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "macros1.h" - -#include <utility> -#include <type_traits> - -// before C++20 -namespace cxx20_compat { - template<typename T> - struct remove_cvref { - using type = std::remove_cv_t<std::remove_reference_t<T>>; - }; -} // ns cxx20_compat - -template<typename t> -using remove_cvref_t = typename cxx20_compat::remove_cvref<t>::type; - -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<std::is_fundamental_v<remove_cvref_t<t>>, - remove_cvref_t<t>, - to_const_ref_t<t>>; |