My Project
add_const.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_ADD_CONST_HPP
29 #define BSL_ADD_CONST_HPP
30 
31 namespace bsl
32 {
43  template<typename T>
44  struct add_const final
45  {
47  using type = T const;
48  };
49 
51  template<typename T>
52  using add_const_t = typename add_const<T>::type;
53 
55 
56  template<typename T>
57  struct add_const<T const> final
58  {
60  using type = T const;
61  };
62 
64 }
65 
66 #endif
Provides the member typedef type which is the same as T, except that a topmost const qualifier is add...
Definition: add_const.hpp:44
T const type
provides the member typedef "type"
Definition: add_const.hpp:47
typename add_const< T >::type add_const_t
a helper that reduces the verbosity of bsl::add_const
Definition: add_const.hpp:52