diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/q20functional.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/global/q20functional.h b/src/corelib/global/q20functional.h index 13e6c9e090..9584252663 100644 --- a/src/corelib/global/q20functional.h +++ b/src/corelib/global/q20functional.h @@ -41,6 +41,19 @@ struct identity #endif // __cpp_lib_ranges } // namespace q20 +namespace q20 { +// like std::remove_cvref(_t) +#ifdef __cpp_lib_remove_cvref +using std::remove_cvref; +using std::remove_cvref_t; +#else +template <typename T> +struct remove_cvref : std::remove_cv<std::remove_reference_t<T>> {}; +template <typename T> +using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>; +#endif // __cpp_lib_remove_cvref +} + QT_END_NAMESPACE #endif /* Q20FUNCTIONAL_H */ |