My Project
remove_cv.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_REMOVE_CV_HPP
29 #define BSL_REMOVE_CV_HPP
30 
31 namespace bsl
32 {
57  template<typename T>
58  struct remove_cv final
59  {
61  using type = T;
62  };
63 
65  template<typename T>
66  using remove_cv_t = typename remove_cv<T>::type;
67 
69 
70  template<typename T>
71  struct remove_cv<T const> final
72  {
74  using type = T;
75  };
76 
77  template<typename T>
78  struct remove_cv<T volatile> final // PRQA S 5219
79  {
80  static_assert(sizeof(T) != sizeof(T), "volatile not supported"); // NOLINT
81 
83  using type = T;
84  };
85 
86  template<typename T>
87  struct remove_cv<T const volatile> final // PRQA S 5219
88  {
89  static_assert(sizeof(T) != sizeof(T), "volatile not supported"); // NOLINT
90 
92  using type = T;
93  };
94 
96 }
97 
98 #endif
T type
provides the member typedef "type"
Definition: remove_cv.hpp:61
typename remove_cv< T >::type remove_cv_t
a helper that reduces the verbosity of bsl::remove_cv
Definition: remove_cv.hpp:66
Provides the member typedef type which is the same as T, except that its topmost const and volatile q...
Definition: remove_cv.hpp:58