rippled
Loading...
Searching...
No Matches
include
xrpl
beast
utility
maybe_const.h
1
#pragma once
2
3
#include <
type_traits
>
4
5
namespace
beast
{
6
8
template
<
bool
IsConst,
class
T>
9
struct
maybe_const
10
{
11
explicit
maybe_const
() =
default
;
12
using
type
=
typename
std::
13
conditional<IsConst, typename std::remove_const<T>::type
const
,
typename
std::remove_const<T>::type
>
::type
;
14
};
15
17
template
<
bool
IsConst,
class
T>
18
using
maybe_const_t
=
typename
maybe_const<IsConst, T>::type
;
19
20
}
// namespace beast
std::is_same_v
T is_same_v
beast
Definition
base_uint.h:637
beast::maybe_const_t
typename maybe_const< IsConst, T >::type maybe_const_t
Alias for omitting typename.
Definition
maybe_const.h:18
std::remove_const
beast::maybe_const
Makes T const or non const depending on a bool.
Definition
maybe_const.h:10
beast::maybe_const::type
typename std::conditional< IsConst, typename std::remove_const< T >::type const, typename std::remove_const< T >::type >::type type
Definition
maybe_const.h:13
beast::maybe_const::maybe_const
maybe_const()=default
type_traits
Generated by
1.9.8