Phi
is_reference_wrapper.hpp
1 #ifndef INCG_PHI_CORE_TYPE_TRAITS_IS_REFERENCE_WRAPPER_HPP
2 #define INCG_PHI_CORE_TYPE_TRAITS_IS_REFERENCE_WRAPPER_HPP
3 
4 #include "phi/phi_config.hpp"
5 
6 #if PHI_HAS_EXTENSION_PRAGMA_ONCE()
7 # pragma once
8 #endif
9 
10 #include "phi/compiler_support/constexpr.hpp"
11 #include "phi/compiler_support/inline_variables.hpp"
12 #include "phi/forward/std/reference_wrapper.hpp"
13 #include "phi/type_traits/integral_constant.hpp"
14 #include "phi/type_traits/remove_cv.hpp"
15 
16 DETAIL_PHI_BEGIN_NAMESPACE()
17 
18 namespace detail
19 {
20  template <typename TypeT>
22  {};
23 
24  template <typename TypeT>
26  {};
27 } // namespace detail
28 
29 template <typename TypeT>
31  : public detail::is_reference_wrapper_impl<typename remove_cv<TypeT>::type>
32 {};
33 
34 template <typename TypeT>
36  : public integral_constant<bool, !is_reference_wrapper<TypeT>::value>
37 {};
38 
39 #if PHI_HAS_FEATURE_VARIABLE_TEMPLATE()
40 
41 template <typename TypeT>
42 PHI_INLINE_VARIABLE PHI_CONSTEXPR bool is_reference_wrapper_v = is_reference_wrapper<TypeT>::value;
43 
44 template <typename TypeT>
45 PHI_INLINE_VARIABLE PHI_CONSTEXPR bool is_not_reference_wrapper_v =
47 
48 #endif
49 
50 DETAIL_PHI_END_NAMESPACE()
51 
52 #endif // INCG_PHI_CORE_TYPE_TRAITS_IS_REFERENCE_WRAPPER_HPP
Definition: integral_constant.hpp:19
Definition: reference_wrapper.hpp:15
Definition: initializer_list.hpp:21
Definition: is_reference_wrapper.hpp:21
Definition: swap.hpp:23
Definition: is_reference_wrapper.hpp:35
Definition: is_reference_wrapper.hpp:30