xrpld
Loading...
Searching...
No Matches
maybe_const.h
1#pragma once
2
3#include <type_traits>
4
5namespace beast {
6
10template <bool IsConst, class T>
12{
13 explicit MaybeConst() = default;
14 using type = std::
15 conditional_t<IsConst, typename std::remove_const<T>::type const, std::remove_const_t<T>>;
16};
17
21template <bool IsConst, class T>
23
24} // namespace beast
MaybeConst< IsConst, T >::type maybe_const_t
Alias for omitting typename.
Definition maybe_const.h:22
MaybeConst()=default
std:: conditional_t< IsConst, typename std::remove_const< T >::type const, std::remove_const_t< T > > type
Definition maybe_const.h:14