aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/experimental/propagate_const
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:11 +0000
commite3b557809604d036af6e00c60f012c2025b59a5e (patch)
tree8a11ba2269a3b669601e2fd41145b174008f4da8 /libcxx/include/experimental/propagate_const
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
downloadsrc-e3b557809604d036af6e00c60f012c2025b59a5e.tar.gz
src-e3b557809604d036af6e00c60f012c2025b59a5e.zip
Diffstat (limited to 'libcxx/include/experimental/propagate_const')
-rw-r--r--libcxx/include/experimental/propagate_const7
1 files changed, 4 insertions, 3 deletions
diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const
index 432635668e4e..34e917da5154 100644
--- a/libcxx/include/experimental/propagate_const
+++ b/libcxx/include/experimental/propagate_const
@@ -109,6 +109,7 @@
#include <__assert> // all public C++ headers provide the assertion handler
#include <__functional/operations.h>
+#include <__fwd/hash.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/swap.h>
@@ -138,15 +139,15 @@ template <class _Tp>
class propagate_const
{
public:
- typedef remove_reference_t<decltype(*declval<_Tp&>())> element_type;
+ typedef remove_reference_t<decltype(*std::declval<_Tp&>())> element_type;
static_assert(!is_array<_Tp>::value,
"Instantiation of propagate_const with an array type is ill-formed.");
static_assert(!is_reference<_Tp>::value,
"Instantiation of propagate_const with a reference type is ill-formed.");
- static_assert(!(is_pointer<_Tp>::value && is_function<typename remove_pointer<_Tp>::type>::value),
+ static_assert(!(is_pointer<_Tp>::value && is_function<__remove_pointer_t<_Tp> >::value),
"Instantiation of propagate_const with a function-pointer type is ill-formed.");
- static_assert(!(is_pointer<_Tp>::value && is_same<typename remove_cv<typename remove_pointer<_Tp>::type>::type, void>::value),
+ static_assert(!(is_pointer<_Tp>::value && is_same<__remove_cv_t<__remove_pointer_t<_Tp> >, void>::value),
"Instantiation of propagate_const with a pointer to (possibly cv-qualified) void is ill-formed.");
private: