1 parent 98eb77a commit 389654bCopy full SHA for 389654b
1 file changed
is_reference_wrapper.hpp
@@ -0,0 +1,13 @@
1
+#pragma once
2
+
3
+#include <functional>
4
5
+// A type can specialize this template if it wants itself to be treated like
6
+// a std::reference_wrapper. E.g. a replacement of std::reference_wrapper that
7
+// supports constexpr operations may want to specialize this template.
8
+template <class T>
9
+struct is_reference_wrapper : std::false_type {};
10
+template <class U>
11
+struct is_reference_wrapper<std::reference_wrapper<U>> : std::true_type {};
12
13
+constexpr bool is_reference_wrapper_v = is_reference_wrapper<T>::value;
0 commit comments