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